Fixing duplicate/inconsistent definitions for model and callbacks

> 2 implementations for filtering workspace items
> 2 implementations for binding widgets
> duplicate logic for add and update appInfo

Change-Id: Id68a49926af398478deca8ac85ab1f22341a9449
This commit is contained in:
Sunny Goyal
2017-08-17 07:45:25 -07:00
parent eeccd38368
commit b23980cc0e
11 changed files with 57 additions and 140 deletions

View File

@@ -132,18 +132,10 @@ public class AllAppsContainerView extends BaseContainerView implements DragSourc
}
/**
* Adds new apps to the list.
* Adds or updates existing apps in the list
*/
public void addApps(List<AppInfo> apps) {
mApps.addApps(apps);
mSearchUiManager.refreshSearchResult();
}
/**
* Updates existing apps in the list
*/
public void updateApps(List<AppInfo> apps) {
mApps.updateApps(apps);
public void addOrUpdateApps(List<AppInfo> apps) {
mApps.addOrUpdateApps(apps);
mSearchUiManager.refreshSearchResult();
}