mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-06 03:49:58 +02:00
bring back 'add attachment later', which was removed at #3601
This commit is contained in:
parent
9b7b35acb1
commit
906db9155a
2 changed files with 14 additions and 1 deletions
|
@ -490,6 +490,13 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||
Log.e(TAG, "cannot set up in-chat-search: ", e);
|
||||
}
|
||||
|
||||
if (!dcChat.canSend() || isEditing) {
|
||||
MenuItem attachItem = menu.findItem(R.id.menu_add_attachment);
|
||||
if (attachItem!=null) {
|
||||
attachItem.setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
super.onPrepareOptionsMenu(menu);
|
||||
return true;
|
||||
}
|
||||
|
@ -498,7 +505,10 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
super.onOptionsItemSelected(item);
|
||||
int itemId = item.getItemId();
|
||||
if (itemId == R.id.menu_leave) {
|
||||
if (itemId == R.id.menu_add_attachment) {
|
||||
handleAddAttachment();
|
||||
return true;
|
||||
} else if (itemId == R.id.menu_leave) {
|
||||
handleLeaveGroup();
|
||||
return true;
|
||||
} else if (itemId == R.id.menu_archive_chat) {
|
||||
|
|
|
@ -41,6 +41,9 @@
|
|||
|
||||
<item android:title="@string/menu_more_options">
|
||||
<menu>
|
||||
<item android:title="@string/menu_add_attachment"
|
||||
android:id="@+id/menu_add_attachment" />
|
||||
|
||||
<item android:id="@+id/menu_leave"
|
||||
android:visible="false"
|
||||
android:title="@string/menu_leave_group"/>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue