mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-24 02:25:19 +00:00
Fix disappearing messages menu item title
This commit is contained in:
parent
4cfa8002d6
commit
2ed271271a
@ -610,8 +610,7 @@ class ConversationActivityV2 : PassphraseRequiredActionBarActivity(), InputBarDe
|
||||
menu,
|
||||
menuInflater,
|
||||
recipient,
|
||||
this,
|
||||
viewModel.expirationConfiguration
|
||||
this
|
||||
)
|
||||
}
|
||||
viewModel.recipient?.let { maybeUpdateToolbar(it) }
|
||||
|
@ -47,8 +47,7 @@ object ConversationMenuHelper {
|
||||
menu: Menu,
|
||||
inflater: MenuInflater,
|
||||
thread: Recipient,
|
||||
context: Context,
|
||||
config: ExpirationConfiguration?
|
||||
context: Context
|
||||
) {
|
||||
// Prepare
|
||||
menu.clear()
|
||||
@ -57,11 +56,7 @@ object ConversationMenuHelper {
|
||||
inflater.inflate(R.menu.menu_conversation, menu)
|
||||
// Expiring messages
|
||||
if (!isOpenGroup && (thread.hasApprovedMe() || thread.isClosedGroupRecipient || thread.isLocalNumber)) {
|
||||
if (config?.isEnabled != true) {
|
||||
inflater.inflate(R.menu.menu_conversation_expiration_off, menu)
|
||||
} else {
|
||||
inflater.inflate(R.menu.menu_conversation_expiration_on, menu)
|
||||
}
|
||||
inflater.inflate(R.menu.menu_conversation_expiration, menu)
|
||||
}
|
||||
// One-on-one chat menu (options that should only be present for one-on-one chats)
|
||||
if (thread.isContactRecipient) {
|
||||
@ -134,7 +129,6 @@ object ConversationMenuHelper {
|
||||
R.id.menu_search -> { search(context) }
|
||||
R.id.menu_add_shortcut -> { addShortcut(context, thread) }
|
||||
R.id.menu_expiring_messages -> { showExpirationSettings(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) }
|
||||
|
@ -1,10 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19.04,4.55l-1.42,1.42C16.07,4.74 14.12,4 12,4c-1.83,0 -3.53,0.55 -4.95,1.48l1.46,1.46C9.53,6.35 10.73,6 12,6c3.87,0 7,3.13 7,7 0,1.27 -0.35,2.47 -0.94,3.49l1.45,1.45C20.45,16.53 21,14.83 21,13c0,-2.12 -0.74,-4.07 -1.97,-5.61l1.42,-1.42 -1.41,-1.42zM15,1L9,1v2h6L15,1zM11,9.44l2,2L13,8h-2v1.44zM3.02,4L1.75,5.27 4.5,8.03C3.55,9.45 3,11.16 3,13c0,4.97 4.02,9 9,9 1.84,0 3.55,-0.55 4.98,-1.5l2.5,2.5 1.27,-1.27 -7.71,-7.71L3.02,4zM12,20c-3.87,0 -7,-3.13 -7,-7 0,-1.28 0.35,-2.48 0.95,-3.52l9.56,9.56c-1.03,0.61 -2.23,0.96 -3.51,0.96z"/>
|
||||
</vector>
|
@ -1,10 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M15,1L9,1v2h6L15,1zM11,14h2L13,8h-2v6zM19.03,7.39l1.42,-1.42c-0.43,-0.51 -0.9,-0.99 -1.41,-1.41l-1.42,1.42C16.07,4.74 14.12,4 12,4c-4.97,0 -9,4.03 -9,9s4.02,9 9,9 9,-4.03 9,-9c0,-2.12 -0.74,-4.07 -1.97,-5.61zM12,20c-3.87,0 -7,-3.13 -7,-7s3.13,-7 7,-7 7,3.13 7,7 -3.13,7 -7,7z" />
|
||||
</vector>
|
@ -4,7 +4,6 @@
|
||||
|
||||
<item
|
||||
android:title="@string/conversation_expiring_off__disappearing_messages"
|
||||
android:id="@+id/menu_expiring_messages_off"
|
||||
android:icon="@drawable/ic_baseline_timer_off_24" />
|
||||
android:id="@+id/menu_expiring_messages" />
|
||||
|
||||
</menu>
|
@ -1,10 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<menu
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:id="@+id/menu_expiring_messages"
|
||||
android:title="@string/menu_conversation_expiring_on__messages_expiring"
|
||||
android:icon="@drawable/ic_baseline_timer_on_24" />
|
||||
|
||||
</menu>
|
Loading…
Reference in New Issue
Block a user