From 67b1dea4c1ee8f14c8717177b9e86415f3dcedff Mon Sep 17 00:00:00 2001 From: "B. Petersen" Date: Fri, 24 May 2019 11:22:37 +0200 Subject: [PATCH] move edit-name-etc to normal menu, the avatar is displayed anyway --- res/menu/profile_chat.xml | 5 ----- res/menu/profile_common.xml | 11 ++++++++++ res/menu/profile_contact.xml | 5 ----- .../securesms/ProfileActivity.java | 20 +++++++++++-------- 4 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 res/menu/profile_common.xml diff --git a/res/menu/profile_chat.xml b/res/menu/profile_chat.xml index 0fcaa467e..4d5529f3a 100644 --- a/res/menu/profile_chat.xml +++ b/res/menu/profile_chat.xml @@ -2,11 +2,6 @@ - - diff --git a/res/menu/profile_common.xml b/res/menu/profile_common.xml new file mode 100644 index 000000000..10ea9319f --- /dev/null +++ b/res/menu/profile_common.xml @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/res/menu/profile_contact.xml b/res/menu/profile_contact.xml index bd7d92a5a..83d96bf2b 100644 --- a/res/menu/profile_contact.xml +++ b/res/menu/profile_contact.xml @@ -2,11 +2,6 @@ - - diff --git a/src/org/thoughtcrime/securesms/ProfileActivity.java b/src/org/thoughtcrime/securesms/ProfileActivity.java index fdeaa4e6c..94ad555ff 100644 --- a/src/org/thoughtcrime/securesms/ProfileActivity.java +++ b/src/org/thoughtcrime/securesms/ProfileActivity.java @@ -90,12 +90,14 @@ public class ProfileActivity extends PassphraseRequiredActionBarActivity public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); + inflater.inflate(R.menu.profile_common, menu); + if (!chatIsGroup) { + menu.findItem(R.id.edit_name_etc).setTitle(R.string.menu_edit_name); + } + if (!isSelfProfile()) { if (chatId != 0) { inflater.inflate(R.menu.profile_chat, menu); - if (!chatIsGroup) { - menu.findItem(R.id.edit_group_name_and_image).setVisible(false); - } } if (isContactProfile()) { @@ -298,11 +300,13 @@ public class ProfileActivity extends PassphraseRequiredActionBarActivity case R.id.menu_vibrate: onVibrateSettings(); break; - case R.id.edit_group_name_and_image: - onEditGroupNameAndImage(); - break; - case R.id.edit_contact_name: - onEditContactName(); + case R.id.edit_name_etc: + if (chatIsGroup) { + onEditGroupNameAndImage(); + } + else { + onEditContactName(); + } break; case R.id.show_encr_info: onEncrInfo();