diff options
author | Daniel Gultsch <daniel@gultsch.de> | 2016-04-09 12:31:08 +0200 |
---|---|---|
committer | Daniel Gultsch <daniel@gultsch.de> | 2016-04-09 12:31:08 +0200 |
commit | 65548ddccb7f63d623a86ad9a740ded87310e313 (patch) | |
tree | 19a97a3a111201e27d96be370e334293b4ff2d89 /src/main/java/eu/siacs/conversations | |
parent | b99d70bfe74ce5dff1c8ed26d7f3dbd577a22125 (diff) |
use startdate as lower bound when querying archive with after=x
Diffstat (limited to 'src/main/java/eu/siacs/conversations')
-rw-r--r-- | src/main/java/eu/siacs/conversations/services/MessageArchiveService.java | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/src/main/java/eu/siacs/conversations/services/MessageArchiveService.java b/src/main/java/eu/siacs/conversations/services/MessageArchiveService.java index a50b45b12..06df1b38a 100644 --- a/src/main/java/eu/siacs/conversations/services/MessageArchiveService.java +++ b/src/main/java/eu/siacs/conversations/services/MessageArchiveService.java @@ -61,11 +61,8 @@ public class MessageArchiveService implements OnAdvancedStreamFeaturesLoaded { } query = new Query(account, startCatchup, endCatchup); } else { - if (pair.second == null) { - query = new Query(account, startCatchup, endCatchup); - } else { - query = new Query(account, pair.second, endCatchup); - } + query = new Query(account, startCatchup, endCatchup); + query.reference = pair.second; } this.queries.add(query); this.execute(query); @@ -285,14 +282,7 @@ public class MessageArchiveService implements OnAdvancedStreamFeaturesLoaded { this.end = end; this.queryId = new BigInteger(50, mXmppConnectionService.getRNG()).toString(32); } - - public Query(Account account, String reference, long end) { - this.account = account; - this.reference = reference; - this.end = end; - this.queryId = new BigInteger(50, mXmppConnectionService.getRNG()).toString(32); - } - + private Query page(String reference) { Query query = new Query(this.account,this.start,this.end); query.reference = reference; |