count all messages in a query

This commit is contained in:
Daniel Gultsch 2016-02-03 16:04:21 +01:00
parent 1274b0ef39
commit 0911669b07
2 changed files with 3 additions and 8 deletions

View file

@ -271,7 +271,7 @@ public class MessageParser extends AbstractParser implements
packet = f.first;
isForwarded = true;
serverMsgId = result.getAttribute("id");
query.incrementTotalCount();
query.incrementMessageCount();
} else if (query != null) {
Log.d(Config.LOGTAG,account.getJid().toBareJid()+": received mam result from invalid sender");
return;
@ -411,9 +411,7 @@ public class MessageParser extends AbstractParser implements
}
}
if (query != null) {
query.incrementMessageCount();
} else {
if (query == null) {
mXmppConnectionService.updateConversationUi();
}

View file

@ -345,12 +345,9 @@ public class MessageArchiveService implements OnAdvancedStreamFeaturesLoaded {
return this.account;
}
public void incrementTotalCount() {
this.totalCount++;
}
public void incrementMessageCount() {
this.messageCount++;
this.totalCount++;
}
public int getTotalCount() {