mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 21:03:54 +01:00
Comments
This commit is contained in:
parent
38dbf9928a
commit
daa02eee2e
1 changed files with 4 additions and 3 deletions
|
|
@ -258,6 +258,7 @@ public class CategorizationFragment extends SherlockFragment{
|
|||
|
||||
@Override
|
||||
protected ArrayList<String> doInBackground(Void... voids) {
|
||||
//If user hasn't typed anything in yet, get GPS and recent items
|
||||
if(TextUtils.isEmpty(filter)) {
|
||||
ArrayList<String> items = new ArrayList<String>();
|
||||
ArrayList<String> mergedItems= new ArrayList<String>();
|
||||
|
|
@ -286,18 +287,18 @@ public class CategorizationFragment extends SherlockFragment{
|
|||
mergedItems.addAll(items);
|
||||
}
|
||||
catch (RemoteException e) {
|
||||
// faaaail
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
//Log.d(TAG, "Merged items: " + mergedItems.toString());
|
||||
return mergedItems;
|
||||
}
|
||||
|
||||
//if user types in something that is in cache, return cached category
|
||||
if(categoriesCache.containsKey(filter)) {
|
||||
return categoriesCache.get(filter);
|
||||
}
|
||||
|
||||
|
||||
//otherwise if user has typed something in, search API for matching categories
|
||||
MWApi api = CommonsApplication.createMWApi();
|
||||
ApiResult result;
|
||||
ArrayList<String> categories = new ArrayList<String>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue