From f9ca376bf32a1903c7e6b8dabea5565f060526f1 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 25 Apr 2013 09:07:52 -0700 Subject: [PATCH] Fix regression in first-categorization experience The skip message now shows when there are no recently-used categories. --- .../org/wikimedia/commons/CategorizationFragment.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/commons/src/main/java/org/wikimedia/commons/CategorizationFragment.java b/commons/src/main/java/org/wikimedia/commons/CategorizationFragment.java index 8b3512c5c..a95172937 100644 --- a/commons/src/main/java/org/wikimedia/commons/CategorizationFragment.java +++ b/commons/src/main/java/org/wikimedia/commons/CategorizationFragment.java @@ -121,9 +121,11 @@ public class CategorizationFragment extends SherlockFragment{ categoriesAdapter.setItems(items); categoriesAdapter.notifyDataSetInvalidated(); categoriesSearchInProgress.setVisibility(View.GONE); - if(!TextUtils.isEmpty(filter) && categories.size() == 0) { - categoriesNotFoundView.setText(getString(R.string.categories_not_found, filter)); - categoriesNotFoundView.setVisibility(View.VISIBLE); + if (categories.size() == 0) { + if(!TextUtils.isEmpty(filter)) { + 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);