diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-02-04 16:29:17 +0100 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-02-04 16:29:17 +0100 |
commit | 28733e052ff1172a0b16ee8d52f1545b0ef32de3 (patch) | |
tree | c83f0c2fde2cea268551bc13abd6e5a80c44197f /src/main/java/eu/siacs/conversations/services | |
parent | 4fdb0d92fe854126ad5201d56752716b9ab581b2 (diff) |
fixed performance regression in on scroll listener
Diffstat (limited to 'src/main/java/eu/siacs/conversations/services')
-rw-r--r-- | src/main/java/eu/siacs/conversations/services/XmppConnectionService.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java index 0973036c7..4fa5ddfff 100644 --- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java +++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java @@ -1216,7 +1216,6 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa if (XmppConnectionService.this.getMessageArchiveService().queryInProgress(conversation, callback)) { return; } else if (timestamp == 0) { - callback.onMoreMessagesLoaded(0, conversation); return; } Log.d(Config.LOGTAG, "load more messages for " + conversation.getName() + " prior to " + MessageGenerator.getTimestamp(timestamp)); @@ -1230,7 +1229,8 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa checkDeletedFiles(conversation); callback.onMoreMessagesLoaded(messages.size(), conversation); } else if (conversation.hasMessagesLeftOnServer() - && account.isOnlineAndConnected()) { + && account.isOnlineAndConnected() + && conversation.getLastClearHistory() == 0) { if ((conversation.getMode() == Conversation.MODE_SINGLE && account.getXmppConnection().getFeatures().mam()) || (conversation.getMode() == Conversation.MODE_MULTI && conversation.getMucOptions().mamSupport())) { MessageArchiveService.Query query = getMessageArchiveService().query(conversation, 0, timestamp); |