mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +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.Parcelable;
|
||||
import android.text.Editable;
|
||||
import android.text.TextUtils;
|
||||
import android.text.TextWatcher;
|
||||
import android.view.*;
|
||||
import android.view.MenuInflater;
|
||||
|
|
@ -109,6 +110,9 @@ public class CategorizationFragment extends SherlockFragment{
|
|||
|
||||
@Override
|
||||
protected ArrayList<String> doInBackground(Void... voids) {
|
||||
if(TextUtils.isEmpty(filter)) {
|
||||
return new ArrayList<String>();
|
||||
}
|
||||
if(categoriesCache.containsKey(filter)) {
|
||||
return categoriesCache.get(filter);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue