From 2b3b423fa38a21f58820514cd57f22bb4f90ab28 Mon Sep 17 00:00:00 2001 From: Alinson Xavier Date: Fri, 11 Mar 2016 12:26:34 -0500 Subject: [PATCH] Show color button even for a single habit --- .../org/isoron/uhabits/dialogs/HabitSelectionCallback.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/src/main/java/org/isoron/uhabits/dialogs/HabitSelectionCallback.java b/app/src/main/java/org/isoron/uhabits/dialogs/HabitSelectionCallback.java index 67c3a7ced..47a23cf28 100644 --- a/app/src/main/java/org/isoron/uhabits/dialogs/HabitSelectionCallback.java +++ b/app/src/main/java/org/isoron/uhabits/dialogs/HabitSelectionCallback.java @@ -111,17 +111,13 @@ public class HabitSelectionCallback implements ActionMode.Callback private void updateActions(Menu menu) { boolean showEdit = (selectedPositions.size() == 1); - boolean showColor = true; boolean showArchive = true; boolean showUnarchive = true; - - if (showEdit) showColor = false; for (int i : selectedPositions) { Habit h = loader.habitsList.get(i); if (h.isArchived()) { - showColor = false; showArchive = false; } else showUnarchive = false; @@ -132,8 +128,8 @@ public class HabitSelectionCallback implements ActionMode.Callback MenuItem itemArchive = menu.findItem(R.id.action_archive_habit); MenuItem itemUnarchive = menu.findItem(R.id.action_unarchive_habit); + itemColor.setVisible(true); itemEdit.setVisible(showEdit); - itemColor.setVisible(showColor); itemArchive.setVisible(showArchive); itemUnarchive.setVisible(showUnarchive); }