From 7a5174d45f70a6f81b0717249f8b1864c8b65685 Mon Sep 17 00:00:00 2001 From: SlowNicoFish Date: Mon, 26 Aug 2024 16:04:48 +0200 Subject: [PATCH] Made show scrollbar setting stick after opening search (#4724) * Made show scrollbar setting stick after opening search * Made show scrollbar setting stick after opening search --- .../launcher3/allapps/ActivityAllAppsContainerView.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java index ce9885a519..81df520a25 100644 --- a/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java +++ b/src/com/android/launcher3/allapps/ActivityAllAppsContainerView.java @@ -178,6 +178,7 @@ public class ActivityAllAppsContainerView * state. */ private boolean mIsSearching; + boolean showFastScroller; private boolean mRebindAdaptersAfterSearchAnimation; private int mNavBarScrimHeight = 0; public SearchRecyclerView mSearchRecyclerView; @@ -259,7 +260,7 @@ public class ActivityAllAppsContainerView * onFinishInflate -> onPostCreate */ protected void initContent() { - boolean showFastScroller = PreferenceExtensionsKt.firstBlocking(pref2.getShowScrollbar()); + showFastScroller = PreferenceExtensionsKt.firstBlocking(pref2.getShowScrollbar()); mMainAdapterProvider = mSearchUiDelegate.createMainAdapterProvider(); @@ -409,6 +410,7 @@ public class ActivityAllAppsContainerView } else if (mAllAppsTransitionController != null) { // If exiting search, revert predictive back scale on all apps mAllAppsTransitionController.animateAllAppsToNoScale(); + mFastScroller.setVisibility(showFastScroller ? VISIBLE : INVISIBLE); } mSearchTransitionController.animateToSearchState(goingToSearch, durationMs, /* onEndRunnable = */ () -> {