Batch selection mode improvements

Simplified and now the same for conversation and conversation list.

Added also some styling.

Closes #7410
This commit is contained in:
art1fa
2018-02-13 21:55:59 +01:00
committed by Moxie Marlinspike
parent 56c95d1d1b
commit 4bdb2acd29
5 changed files with 27 additions and 11 deletions

View File

@@ -322,8 +322,7 @@ public class ConversationListFragment extends Fragment
private void handleSelectAllThreads() {
getListAdapter().selectAllThreads();
actionMode.setSubtitle(getString(R.string.conversation_fragment_cab__batch_selection_amount,
String.valueOf(getListAdapter().getBatchSelections().size())));
actionMode.setTitle(String.valueOf(getListAdapter().getBatchSelections().size()));
}
private void handleCreateConversation(long threadId, Recipient recipient, int distributionType, long lastSeen) {
@@ -374,8 +373,7 @@ public class ConversationListFragment extends Fragment
if (adapter.getBatchSelections().size() == 0) {
actionMode.finish();
} else {
actionMode.setSubtitle(getString(R.string.conversation_fragment_cab__batch_selection_amount,
String.valueOf(adapter.getBatchSelections().size())));
actionMode.setTitle(String.valueOf(getListAdapter().getBatchSelections().size()));
}
adapter.notifyDataSetChanged();
@@ -410,8 +408,7 @@ public class ConversationListFragment extends Fragment
inflater.inflate(R.menu.conversation_list_batch, menu);
mode.setTitle(R.string.conversation_fragment_cab__batch_selection_mode);
mode.setSubtitle(getString(R.string.conversation_fragment_cab__batch_selection_amount, "1"));
mode.setTitle("1");
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
getActivity().getWindow().setStatusBarColor(getResources().getColor(R.color.action_mode_status_bar));