mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-26 07:56:59 +00:00
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:
committed by
Moxie Marlinspike
parent
56c95d1d1b
commit
4bdb2acd29
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user