diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/menus/ConversationMenuHelper.kt b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/menus/ConversationMenuHelper.kt index 720ebcd5c8..0e92f7bd13 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/menus/ConversationMenuHelper.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/v2/menus/ConversationMenuHelper.kt @@ -62,6 +62,12 @@ object ConversationMenuHelper { item.actionView.setOnClickListener { onOptionsItemSelected(item) } } val menu = item.subMenu + // Expiring messages + if (thread.expireMessages == 0 && !isOpenGroup && + (thread.hasApprovedMe() || thread.isClosedGroupRecipient || thread.isLocalNumber) + ) { + inflater.inflate(R.menu.menu_conversation_expiration_off, menu) + } // One-on-one chat menu (options that should only be present for one-on-one chats) if (thread.isContactRecipient) { if (thread.isBlocked) { @@ -132,6 +138,7 @@ object ConversationMenuHelper { R.id.menu_view_all_media -> { showAllMedia(context, thread) } R.id.menu_search -> { search(context) } R.id.menu_add_shortcut -> { addShortcut(context, thread) } + R.id.menu_expiring_messages_off -> { showExpirationSettings(context, thread) } R.id.menu_unblock -> { unblock(context, thread) } R.id.menu_block -> { block(context, thread, deleteThread = false) } R.id.menu_block_delete -> { blockAndDelete(context, thread) } diff --git a/app/src/main/res/menu/menu_conversation_expiration_off.xml b/app/src/main/res/menu/menu_conversation_expiration_off.xml new file mode 100644 index 0000000000..8e062dc644 --- /dev/null +++ b/app/src/main/res/menu/menu_conversation_expiration_off.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file