mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 12:23:58 +01:00
Hide the "skip" message if we load up some recent cats
This commit is contained in:
parent
6e8e804861
commit
8b351d94a3
1 changed files with 13 additions and 5 deletions
|
|
@ -124,6 +124,9 @@ public class CategorizationFragment extends SherlockFragment{
|
|||
if(!TextUtils.isEmpty(filter) && categories.size() == 0) {
|
||||
categoriesNotFoundView.setText(getString(R.string.categories_not_found, filter));
|
||||
categoriesNotFoundView.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
// If we found recent cats, hide the skip message!
|
||||
categoriesSkip.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -308,11 +311,7 @@ public class CategorizationFragment extends SherlockFragment{
|
|||
}
|
||||
|
||||
public void onTextChanged(CharSequence charSequence, int i, int i2, int i3) {
|
||||
if(lastUpdater != null) {
|
||||
lastUpdater.cancel(true);
|
||||
}
|
||||
lastUpdater = new CategoriesUpdater();
|
||||
Utils.executeAsyncTask(lastUpdater, executor);
|
||||
startUpdatingCategoryList();
|
||||
}
|
||||
|
||||
public void afterTextChanged(Editable editable) {
|
||||
|
|
@ -320,10 +319,19 @@ public class CategorizationFragment extends SherlockFragment{
|
|||
}
|
||||
});
|
||||
|
||||
startUpdatingCategoryList();
|
||||
|
||||
return rootView;
|
||||
}
|
||||
|
||||
private void startUpdatingCategoryList() {
|
||||
if (lastUpdater != null) {
|
||||
lastUpdater.cancel(true);
|
||||
}
|
||||
lastUpdater = new CategoriesUpdater();
|
||||
Utils.executeAsyncTask(lastUpdater, executor);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCreateOptionsMenu(Menu menu, com.actionbarsherlock.view.MenuInflater inflater) {
|
||||
menu.clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue