mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-03 09:49:21 +02:00
move edit-name-etc to normal menu, the avatar is displayed anyway
This commit is contained in:
parent
1fb81d69dd
commit
67b1dea4c1
4 changed files with 23 additions and 18 deletions
|
@ -2,11 +2,6 @@
|
||||||
|
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
|
<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<item android:title="@string/menu_group_name_and_image"
|
|
||||||
android:id="@+id/edit_group_name_and_image"
|
|
||||||
android:icon="@drawable/ic_create_white_24dp"
|
|
||||||
app:showAsAction="always"/>
|
|
||||||
|
|
||||||
<item android:title="@string/menu_mute"
|
<item android:title="@string/menu_mute"
|
||||||
android:id="@+id/menu_mute_notifications"
|
android:id="@+id/menu_mute_notifications"
|
||||||
app:showAsAction="never"/>
|
app:showAsAction="never"/>
|
||||||
|
|
11
res/menu/profile_common.xml
Normal file
11
res/menu/profile_common.xml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
|
<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
|
<!-- android:icon="@drawable/ic_create_white_24dp" app:showAsAction="always" is not needed as the image is already shown
|
||||||
|
and editing group images and names is not an action that is used every time the profile is opened -->
|
||||||
|
<item android:title="@string/menu_group_name_and_image"
|
||||||
|
android:id="@+id/edit_name_etc"
|
||||||
|
app:showAsAction="never"/>
|
||||||
|
|
||||||
|
</menu>
|
|
@ -2,11 +2,6 @@
|
||||||
|
|
||||||
<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
|
<menu xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||||
|
|
||||||
<item android:title="@string/menu_edit_name"
|
|
||||||
android:id="@+id/edit_contact_name"
|
|
||||||
android:icon="@drawable/ic_create_white_24dp"
|
|
||||||
app:showAsAction="always"/>
|
|
||||||
|
|
||||||
<item android:title="@string/profile_encryption"
|
<item android:title="@string/profile_encryption"
|
||||||
android:id="@+id/show_encr_info"
|
android:id="@+id/show_encr_info"
|
||||||
app:showAsAction="never"/>
|
app:showAsAction="never"/>
|
||||||
|
|
|
@ -90,12 +90,14 @@ public class ProfileActivity extends PassphraseRequiredActionBarActivity
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
MenuInflater inflater = getMenuInflater();
|
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 (!isSelfProfile()) {
|
||||||
if (chatId != 0) {
|
if (chatId != 0) {
|
||||||
inflater.inflate(R.menu.profile_chat, menu);
|
inflater.inflate(R.menu.profile_chat, menu);
|
||||||
if (!chatIsGroup) {
|
|
||||||
menu.findItem(R.id.edit_group_name_and_image).setVisible(false);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isContactProfile()) {
|
if (isContactProfile()) {
|
||||||
|
@ -298,11 +300,13 @@ public class ProfileActivity extends PassphraseRequiredActionBarActivity
|
||||||
case R.id.menu_vibrate:
|
case R.id.menu_vibrate:
|
||||||
onVibrateSettings();
|
onVibrateSettings();
|
||||||
break;
|
break;
|
||||||
case R.id.edit_group_name_and_image:
|
case R.id.edit_name_etc:
|
||||||
onEditGroupNameAndImage();
|
if (chatIsGroup) {
|
||||||
break;
|
onEditGroupNameAndImage();
|
||||||
case R.id.edit_contact_name:
|
}
|
||||||
onEditContactName();
|
else {
|
||||||
|
onEditContactName();
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case R.id.show_encr_info:
|
case R.id.show_encr_info:
|
||||||
onEncrInfo();
|
onEncrInfo();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue