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
This commit is contained in:
SlowNicoFish
2024-08-26 16:04:48 +02:00
committed by GitHub
parent 4c9b8b0312
commit 7a5174d45f

View File

@@ -178,6 +178,7 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
* state.
*/
private boolean mIsSearching;
boolean showFastScroller;
private boolean mRebindAdaptersAfterSearchAnimation;
private int mNavBarScrimHeight = 0;
public SearchRecyclerView mSearchRecyclerView;
@@ -259,7 +260,7 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
* 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<T extends Context & ActivityContext>
} 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 = */ () -> {