diff --git a/CHANGELOG.md b/CHANGELOG.md index 00b7fbfce..52bb99220 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ * Allow to share location for 24 hours * Allow mini-apps to play audio without user interaction * Mark chats as unread (long tap a chat and select the corresponding option from the three-dot-menu) +* Add "Mark all as read" option to profile menu in the profile switcher * Fix process of upgrading from a very old version of the app * Show more recent added stickers at the top of the sticker picker * Allow to open links in messages via actions in TalkBack menu diff --git a/src/main/java/org/thoughtcrime/securesms/accounts/AccountSelectionListFragment.java b/src/main/java/org/thoughtcrime/securesms/accounts/AccountSelectionListFragment.java index 8098ef0ee..05893f499 100644 --- a/src/main/java/org/thoughtcrime/securesms/accounts/AccountSelectionListFragment.java +++ b/src/main/java/org/thoughtcrime/securesms/accounts/AccountSelectionListFragment.java @@ -157,6 +157,12 @@ public class AccountSelectionListFragment extends DialogFragment onSetTag(accountId); } else if (itemId == R.id.menu_move_to_top) { onMoveToTop(accountId); + } else if (itemId == R.id.menu_mark_all_as_read) { + try { + DcHelper.getRpc(requireActivity()).marknoticedAllChats(accountId); + } catch (RpcException e) { + Log.e(TAG, "Error calling rpc.marknoticedAllChats()", e); + } } } diff --git a/src/main/res/menu/account_item_context.xml b/src/main/res/menu/account_item_context.xml index 1fc476d11..165517152 100644 --- a/src/main/res/menu/account_item_context.xml +++ b/src/main/res/menu/account_item_context.xml @@ -2,6 +2,10 @@