mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-03 01:16:49 +00:00
Fixing issues in Launcher
- Now ending choice mode if a selected application is removed - Only updating apps in the customization drawer if the applications change - Adding null check when determining scrolling in PagedView Change-Id: I0b23d1383649626dc012bd70a5e8087885b77c17
This commit is contained in:
@@ -144,7 +144,7 @@ public class CustomizePagedView extends PagedView
|
||||
Collections.sort(mApps, LauncherModel.APP_NAME_COMPARATOR);
|
||||
|
||||
// Update the widgets/shortcuts to reflect changes in the set of available apps
|
||||
update();
|
||||
invalidatePageDataAndIconCache();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -170,7 +170,7 @@ public class CustomizePagedView extends PagedView
|
||||
addAppsWithoutInvalidate(list);
|
||||
|
||||
// Update the widgets/shortcuts to reflect changes in the set of available apps
|
||||
update();
|
||||
invalidatePageDataAndIconCache();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -197,7 +197,7 @@ public class CustomizePagedView extends PagedView
|
||||
removeAppsWithoutInvalidate(list);
|
||||
|
||||
// Update the widgets/shortcuts to reflect changes in the set of available apps
|
||||
update();
|
||||
invalidatePageDataAndIconCache();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -212,7 +212,7 @@ public class CustomizePagedView extends PagedView
|
||||
addAppsWithoutInvalidate(list);
|
||||
|
||||
// Update the widgets/shortcuts to reflect changes in the set of available apps
|
||||
update();
|
||||
invalidatePageDataAndIconCache();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -231,8 +231,6 @@ public class CustomizePagedView extends PagedView
|
||||
}
|
||||
|
||||
public void update() {
|
||||
Context context = getContext();
|
||||
|
||||
// get the list of widgets
|
||||
mWidgetList = AppWidgetManager.getInstance(mLauncher).getInstalledProviders();
|
||||
Collections.sort(mWidgetList, new Comparator<AppWidgetProviderInfo>() {
|
||||
@@ -260,7 +258,11 @@ public class CustomizePagedView extends PagedView
|
||||
mWallpaperList = mPackageManager.queryIntentActivities(wallpapersIntent, 0);
|
||||
Collections.sort(mWallpaperList, resolveInfoComparator);
|
||||
|
||||
// reset the icon cache
|
||||
invalidatePageDataAndIconCache();
|
||||
}
|
||||
|
||||
private void invalidatePageDataAndIconCache() {
|
||||
// Reset the icon cache
|
||||
mPageViewIconCache.clear();
|
||||
|
||||
// Refresh all the tabs
|
||||
|
||||
Reference in New Issue
Block a user