Skip to content

Commit 41e573e

Browse files
authored
Merge pull request #17062 from wordpress-mobile/fix/jetpack-banner-visible-in-jetpack-app
Use Jetpack branding utils flag to set banner visibility in search
2 parents 71730fc + 4061626 commit 41e573e

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)