notfiy after mam catchup only if message count > 0

This commit is contained in:
Daniel Gultsch 2015-12-11 20:43:50 +01:00
parent 5e79e94e77
commit 5e4b55a0ff

View File

@ -205,7 +205,7 @@ public class MessageArchiveService implements OnAdvancedStreamFeaturesLoaded {
if (complete || relevant == null || abort) {
this.finalizeQuery(query);
Log.d(Config.LOGTAG,query.getAccount().getJid().toBareJid().toString()+": finished mam after "+query.getTotalCount()+" messages");
if (query.getWith() == null && query.getTotalCount() > 0) {
if (query.getWith() == null && query.getMessageCount() > 0) {
mXmppConnectionService.getNotificationService().finishBacklog(true);
}
} else {