mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Do not show all categories when filter is empty
This commit is contained in:
parent
cdbd24ad2b
commit
ff1a5aed1c
1 changed files with 4 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ import android.os.Bundle;
|
||||||
import android.os.Parcel;
|
import android.os.Parcel;
|
||||||
import android.os.Parcelable;
|
import android.os.Parcelable;
|
||||||
import android.text.Editable;
|
import android.text.Editable;
|
||||||
|
import android.text.TextUtils;
|
||||||
import android.text.TextWatcher;
|
import android.text.TextWatcher;
|
||||||
import android.view.*;
|
import android.view.*;
|
||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
|
|
@ -109,6 +110,9 @@ public class CategorizationFragment extends SherlockFragment{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected ArrayList<String> doInBackground(Void... voids) {
|
protected ArrayList<String> doInBackground(Void... voids) {
|
||||||
|
if(TextUtils.isEmpty(filter)) {
|
||||||
|
return new ArrayList<String>();
|
||||||
|
}
|
||||||
if(categoriesCache.containsKey(filter)) {
|
if(categoriesCache.containsKey(filter)) {
|
||||||
return categoriesCache.get(filter);
|
return categoriesCache.get(filter);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue