mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 20:15:21 +00:00
Restore disappearing messages off menu item
This commit is contained in:
parent
84ee3eba21
commit
92123b2417
@ -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) }
|
||||
|
10
app/src/main/res/menu/menu_conversation_expiration_off.xml
Normal file
10
app/src/main/res/menu/menu_conversation_expiration_off.xml
Normal file
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:title="@string/conversation_expiring_off__disappearing_messages"
|
||||
android:id="@+id/menu_expiring_messages_off"
|
||||
android:icon="@drawable/ic_baseline_timer_off_24" />
|
||||
|
||||
</menu>
|
Loading…
Reference in New Issue
Block a user