renaming a menu item

This commit is contained in:
tibbi 2023-02-08 10:08:37 +01:00
parent be168a8f6e
commit 251d885836
2 changed files with 3 additions and 3 deletions

View File

@ -68,7 +68,7 @@ class ConversationsAdapter(
findItem(R.id.cab_add_number_to_contact).isVisible = isSingleSelection && !isGroupConversation
findItem(R.id.cab_dial_number).isVisible = isSingleSelection && !isGroupConversation && !isShortCodeWithLetters(selectedConversation!!.phoneNumber)
findItem(R.id.cab_copy_number).isVisible = isSingleSelection && !isGroupConversation
findItem(R.id.rename_conversation).isVisible = isSingleSelection && isGroupConversation
findItem(R.id.cab_rename_conversation).isVisible = isSingleSelection && isGroupConversation
findItem(R.id.cab_mark_as_read).isVisible = selectedItems.any { !it.read }
findItem(R.id.cab_mark_as_unread).isVisible = selectedItems.any { it.read }
checkPinBtnVisibility(this)
@ -86,7 +86,7 @@ class ConversationsAdapter(
R.id.cab_dial_number -> dialNumber()
R.id.cab_copy_number -> copyNumberToClipboard()
R.id.cab_delete -> askConfirmDelete()
R.id.rename_conversation -> renameConversation(getSelectedItems().first())
R.id.cab_rename_conversation -> renameConversation(getSelectedItems().first())
R.id.cab_mark_as_read -> markAsRead()
R.id.cab_mark_as_unread -> markAsUnread()
R.id.cab_pin_conversation -> pinConversation(true)

View File

@ -32,7 +32,7 @@
android:title="@string/copy_number_to_clipboard"
app:showAsAction="never" />
<item
android:id="@+id/rename_conversation"
android:id="@+id/cab_rename_conversation"
android:icon="@drawable/ic_edit_vector"
android:title="@string/rename_conversation"
app:showAsAction="ifRoom" />