mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
Remove unnecessary calls in MethodAUpdater
This commit is contained in:
parent
9871da97ea
commit
33710dd48c
1 changed files with 0 additions and 15 deletions
|
|
@ -79,21 +79,6 @@ public class MethodAUpdater extends AsyncTask<Void, Void, ArrayList<String>> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ArrayList<String> doInBackground(Void... voids) {
|
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> mergedItems = new ArrayList<String>(catFragment.mergeItems());
|
|
||||||
Log.d(TAG, "Merged items, waiting for filter");
|
|
||||||
ArrayList<String> filteredItems = new ArrayList<String>(filterYears(mergedItems));
|
|
||||||
return filteredItems;
|
|
||||||
}
|
|
||||||
|
|
||||||
//if user types in something that is in cache, return cached category
|
|
||||||
if(catFragment.categoriesCache.containsKey(filter)) {
|
|
||||||
ArrayList<String> cachedItems = new ArrayList<String>(catFragment.categoriesCache.get(filter));
|
|
||||||
Log.d(TAG, "Found cache items, waiting for filter");
|
|
||||||
ArrayList<String> filteredItems = new ArrayList<String>(filterYears(cachedItems));
|
|
||||||
return filteredItems;
|
|
||||||
}
|
|
||||||
|
|
||||||
//otherwise if user has typed something in that isn't in cache, search API for matching categories
|
//otherwise if user has typed something in that isn't in cache, search API for matching categories
|
||||||
MWApi api = CommonsApplication.createMWApi();
|
MWApi api = CommonsApplication.createMWApi();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue