diff options
-rw-r--r-- | src/main/java/de/pixart/messenger/services/XmppConnectionService.java | 16 | ||||
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java | 3 |
2 files changed, 0 insertions, 19 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java index 41e4a862a..98ca81bdc 100644 --- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java +++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java @@ -2352,7 +2352,6 @@ public class XmppConnectionService extends Service { return conversation; } conversation = databaseBackend.findConversation(account, jid); - final boolean loadMessagesFromDb; if (conversation != null) { conversation.setStatus(Conversation.STATUS_AVAILABLE); conversation.setAccount(account); @@ -2364,7 +2363,6 @@ public class XmppConnectionService extends Service { conversation.setContactJid(jid.asBareJid()); } databaseBackend.updateConversation(conversation); - loadMessagesFromDb = conversation.messagesLoaded.compareAndSet(true, false); } else { String conversationName; Contact contact = account.getRoster().getContact(jid); @@ -2380,21 +2378,7 @@ public class XmppConnectionService extends Service { conversation = new Conversation(conversationName, account, jid.asBareJid(), Conversation.MODE_SINGLE); } - this.databaseBackend.createConversation(conversation); - loadMessagesFromDb = false; } - final Conversation c = conversation; - mDatabaseReaderExecutor.execute(new Runnable() { - @Override - public void run() { - if (loadMessagesFromDb) { - c.addAll(0, databaseBackend.getMessages(c, Config.PAGE_SIZE)); - updateConversationUi(); - c.messagesLoaded.set(true); - } - } - }); - updateConversationUi(); return conversation; } } diff --git a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java index 0d6d9fba5..968042689 100644 --- a/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ContactDetailsActivity.java @@ -690,9 +690,6 @@ public class ContactDetailsActivity extends OmemoActivity implements OnAccountUp return; } this.mConversation = xmppConnectionService.findConversation(account, contactJid, false); - if (this.mConversation != null) { - populateView(); - } this.contact = account.getRoster().getContact(contactJid); if (mPendingFingerprintVerificationUri != null) { processFingerprintVerification(mPendingFingerprintVerificationUri); |