diff options
author | Daniel Gultsch <inputmice@siacs.eu> | 2015-01-07 12:20:39 +0100 |
---|---|---|
committer | Daniel Gultsch <inputmice@siacs.eu> | 2015-01-07 12:20:39 +0100 |
commit | 81e9afdf192aa925f1dc18a1b5e1d666ab153342 (patch) | |
tree | d426f7225e9a23bd0501eae731401234fef7fdd1 /src/main/java/eu/siacs | |
parent | 943a01b9bf8cc5c66ad094850a3f42f790cfac14 (diff) |
reset next encryption when archiving conversations
Diffstat (limited to 'src/main/java/eu/siacs')
-rw-r--r-- | src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | 3 | ||||
-rw-r--r-- | src/main/java/eu/siacs/conversations/ui/ConversationActivity.java | 1 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 90e9f20be..5d314ecf6 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -1005,6 +1005,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa } else { conversation.setMode(Conversation.MODE_SINGLE); } + conversation.setNextEncryption(-1); conversation.addAll(0, databaseBackend.getMessages(conversation, Config.PAGE_SIZE)); this.databaseBackend.updateConversation(conversation); } else { @@ -1040,6 +1041,8 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa } public void archiveConversation(Conversation conversation) { + conversation.setStatus(Conversation.STATUS_ARCHIVED); + conversation.setNextEncryption(-1); synchronized (this.conversations) { if (conversation.getMode() == Conversation.MODE_MULTI) { if (conversation.getAccount().getStatus() == Account.State.ONLINE) { diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java index e71f4cbb0..795dabf2b 100644 --- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java @@ -492,7 +492,6 @@ public class ConversationActivity extends XmppActivity } public void endConversation(Conversation conversation) { - conversation.setStatus(Conversation.STATUS_ARCHIVED); showConversationsOverview(); xmppConnectionService.archiveConversation(conversation); if (conversationList.size() > 0) { |