mirror of
https://github.com/deltachat/deltachat-android.git
synced 2025-10-03 09:49:21 +02:00
use tri-state for archived
This commit is contained in:
parent
0a30ebdc5b
commit
c3556f01f2
4 changed files with 9 additions and 10 deletions
|
@ -447,11 +447,11 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||
}
|
||||
}
|
||||
|
||||
if( dcChat.getArchived()==0 ) {
|
||||
inflater.inflate(R.menu.conversation_archive, menu);
|
||||
if( dcChat.getArchived()==1 ) {
|
||||
inflater.inflate(R.menu.conversation_unarchive, menu);
|
||||
}
|
||||
else {
|
||||
inflater.inflate(R.menu.conversation_unarchive, menu);
|
||||
inflater.inflate(R.menu.conversation_archive, menu);
|
||||
}
|
||||
|
||||
inflater.inflate(R.menu.conversation_delete, menu);
|
||||
|
@ -558,7 +558,7 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
|
|||
}
|
||||
|
||||
private void handleArchiveChat() {
|
||||
int doArchive = dcContext.getChat(chatId).getArchived() == 0 ? 1: 0;
|
||||
int doArchive = dcContext.getChat(chatId).getArchived() == 1 ? 0: 1;
|
||||
dcContext.archiveChat(chatId, doArchive);
|
||||
Toast.makeText(this, getString(R.string.done), Toast.LENGTH_SHORT).show();
|
||||
if( doArchive == 1 ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue