Fixed NPE while loading messages via MAM

This commit is contained in:
steckbrief 2016-02-12 19:28:29 +01:00
parent 97749cd8f7
commit 2168c73786

View file

@ -161,6 +161,7 @@ public class MessageArchiveService implements OnAdvancedStreamFeaturesLoaded {
final Conversation conversation = query.getConversation();
if (conversation != null) {
conversation.sort();
conversation.setHasMessagesLeftOnServer(query.getMessageCount() > 0);
} else {
for(Conversation tmp : this.mXmppConnectionService.getConversations()) {
if (tmp.getAccount() == query.getAccount()) {
@ -171,7 +172,6 @@ public class MessageArchiveService implements OnAdvancedStreamFeaturesLoaded {
if (query.hasCallback()) {
query.callback();
} else {
conversation.setHasMessagesLeftOnServer(query.getMessageCount() > 0);
this.mXmppConnectionService.updateConversationUi();
}
}