aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/eu/siacs/conversations/parser/MessageParser.java6
-rw-r--r--src/main/java/eu/siacs/conversations/services/MessageArchiveService.java5
2 files changed, 3 insertions, 8 deletions
diff --git a/src/main/java/eu/siacs/conversations/parser/MessageParser.java b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
index d8eae969..60948918 100644
--- a/src/main/java/eu/siacs/conversations/parser/MessageParser.java
+++ b/src/main/java/eu/siacs/conversations/parser/MessageParser.java
@@ -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();
}
diff --git a/src/main/java/eu/siacs/conversations/services/MessageArchiveService.java b/src/main/java/eu/siacs/conversations/services/MessageArchiveService.java
index 4403f99c..0d8e49d6 100644
--- a/src/main/java/eu/siacs/conversations/services/MessageArchiveService.java
+++ b/src/main/java/eu/siacs/conversations/services/MessageArchiveService.java
@@ -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() {