Skip to content

Commit 4061626

Browse files
Matthew KevinsMatthew Kevins
authored andcommitted
Use Jetpack branding utils flag to set banner visibility in search
When displaying or hiding the banner during animation, this still uses the branding utils logic to display or hide the banner.
1 parent 71730fc commit 4061626

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

WordPress/src/main/java/org/wordpress/android/ui/reader/ReaderPostListFragment.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -507,15 +507,15 @@ public void onCreate(Bundle savedInstanceState) {
507507
private void toggleJetpackBannerIfEnabled(final boolean showIfEnabled, boolean animateOnScroll) {
508508
if (!isAdded() || getView() == null || !isSearching()) return;
509509

510-
if (animateOnScroll) {
511-
RecyclerView scrollView = mRecyclerView.getInternalRecyclerView();
512-
mJetpackBrandingUtils.showJetpackBannerIfScrolledToTop(mJetpackBanner, scrollView);
513-
mJetpackBrandingUtils.setNavigationBarColorForBanner(requireActivity().getWindow());
514-
// Return early since the banner visibility was handled by showJetpackBannerIfScrolledToTop
515-
return;
516-
}
517-
518510
if (mJetpackBrandingUtils.shouldShowJetpackBranding()) {
511+
if (animateOnScroll) {
512+
RecyclerView scrollView = mRecyclerView.getInternalRecyclerView();
513+
mJetpackBrandingUtils.showJetpackBannerIfScrolledToTop(mJetpackBanner, scrollView);
514+
mJetpackBrandingUtils.setNavigationBarColorForBanner(requireActivity().getWindow());
515+
// Return early since the banner visibility was handled by showJetpackBannerIfScrolledToTop
516+
return;
517+
}
518+
519519
if (showIfEnabled && !mDisplayUtilsWrapper.isPhoneLandscape()) {
520520
showJetpackBanner();
521521
} else {

0 commit comments

Comments
 (0)