From a020a57be6523888304b9bcbb042e0abbcf76495 Mon Sep 17 00:00:00 2001 From: Veeti Paananen Date: Tue, 25 Feb 2014 05:23:21 +0200 Subject: [PATCH] End conversation selection action mode if all deselected This seems to be common convention in most apps. --- src/org/thoughtcrime/securesms/ConversationListFragment.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/org/thoughtcrime/securesms/ConversationListFragment.java b/src/org/thoughtcrime/securesms/ConversationListFragment.java index a602857c7c..ae82b72758 100644 --- a/src/org/thoughtcrime/securesms/ConversationListFragment.java +++ b/src/org/thoughtcrime/securesms/ConversationListFragment.java @@ -107,6 +107,11 @@ public class ConversationListFragment extends SherlockListFragment } else { ConversationListAdapter adapter = (ConversationListAdapter)getListAdapter(); adapter.toggleThreadInBatchSet(headerView.getThreadId()); + + if (adapter.getBatchSelections().size() == 0) { + actionMode.finish(); + } + adapter.notifyDataSetChanged(); } }