mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-03 17:59:39 +02:00
hide 'add attachment' in chats that cannot send messages
This commit is contained in:
parent
0a3dee4573
commit
158d272419
1 changed files with 7 additions and 0 deletions
|
@ -486,6 +486,13 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
||||||
Log.e(TAG, "cannot set up in-chat-search: ", e);
|
Log.e(TAG, "cannot set up in-chat-search: ", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!dcChat.canSend()) {
|
||||||
|
MenuItem attachItem = menu.findItem(R.id.menu_add_attachment);
|
||||||
|
if (attachItem!=null) {
|
||||||
|
attachItem.setVisible(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
super.onPrepareOptionsMenu(menu);
|
super.onPrepareOptionsMenu(menu);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue