Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit eefe87f8 authored by Tommy Webb's avatar Tommy Webb Committed by Michael Bestas
Browse files

Hide scrollbar when searching All Apps

There's nothing to scroll when searching, so hide the scrollbar.

Change-Id: Ia04d5d3fe87c573c93856bc4223c92ccfb33c619
parent 0bbe5660
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -408,6 +408,7 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
            // If exiting search, revert predictive back scale on all apps
            mAllAppsTransitionController.animateAllAppsToNoScale();
        }
        setScrollbarVisibility(!goingToSearch);
        mSearchTransitionController.animateToState(goingToSearch, durationMs,
                /* onEndRunnable = */ () -> {
                    mIsSearching = goingToSearch;
@@ -1217,6 +1218,13 @@ public class ActivityAllAppsContainerView<T extends Context & ActivityContext>
        }
    }

    protected void setScrollbarVisibility(boolean visible) {
        AllAppsRecyclerView rv = getActiveRecyclerView();
        if (rv != null && rv.getScrollbar() != null) {
            rv.getScrollbar().setVisibility(visible ? VISIBLE : GONE);
        }
    }

    protected void updateSearchResultsVisibility() {
        if (isSearching()) {
            getSearchRecyclerView().setVisibility(VISIBLE);