skip refresh if binding is missing

This commit is contained in:
Daniel Gultsch 2018-02-25 15:43:19 +01:00
parent 8aba540717
commit 21c9ffd8b2
2 changed files with 8 additions and 0 deletions

View File

@ -1826,6 +1826,10 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
@Override
public void refresh() {
if (this.binding == null) {
Log.d(Config.LOGTAG,"ConversationFragment.refresh() skipped updated because view binding was null");
return;
}
this.refresh(true);
}

View File

@ -154,6 +154,10 @@ public class ConversationsOverviewFragment extends XmppFragment implements Enhan
@Override
void refresh() {
if (this.binding == null || this.activity == null) {
Log.d(Config.LOGTAG,"ConversationsOverviewFragment.refresh() skipped updated because view binding or activity was null");
return;
}
this.activity.xmppConnectionService.populateWithOrderedConversations(this.conversations);
Conversation removed = this.swipedConversation.peek();
if (removed != null) {