mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-01 16:26:47 +00:00
Rebind recycler views if launcher activity restarted
Bug: 185038312 Test: manual TL;DR;; What was attempted but was too much refactoring of the code. Failed attempt #1: try re triggering the search. This was not trivial as SearchSession object is yet created. Failed attempt #2: Restoring AdapterItems in AlphabeticalAppsList This meant AdapterItems class and also it's children had to extend Parceleable object. Ultimate fix: Original issue of dupe view id among slice and work recyclerview should be fixed. And restoring should just work. Change-Id: I1bddd6aa5bc736ade3b02f69aa947d64cfa467d6
This commit is contained in:
@@ -40,6 +40,7 @@ import com.android.launcher3.BaseRecyclerView;
|
||||
import com.android.launcher3.DeviceProfile;
|
||||
import com.android.launcher3.LauncherAppState;
|
||||
import com.android.launcher3.R;
|
||||
import com.android.launcher3.config.FeatureFlags;
|
||||
import com.android.launcher3.logging.StatsLogManager;
|
||||
import com.android.launcher3.views.ActivityContext;
|
||||
import com.android.launcher3.views.RecyclerViewFastScroller;
|
||||
@@ -166,7 +167,7 @@ public class AllAppsRecyclerView extends BaseRecyclerView {
|
||||
// Always scroll the view to the top so the user can see the changed results
|
||||
scrollToTop();
|
||||
|
||||
if (mApps.hasNoFilteredResults()) {
|
||||
if (mApps.hasNoFilteredResults() && !FeatureFlags.ENABLE_DEVICE_SEARCH.get()) {
|
||||
if (mEmptySearchBackground == null) {
|
||||
mEmptySearchBackground = new AllAppsBackgroundDrawable(getContext());
|
||||
mEmptySearchBackground.setAlpha(0);
|
||||
|
||||
Reference in New Issue
Block a user