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 @Override
public void refresh() { public void refresh() {
if (this.binding == null) {
Log.d(Config.LOGTAG,"ConversationFragment.refresh() skipped updated because view binding was null");
return;
}
this.refresh(true); this.refresh(true);
} }

View file

@ -154,6 +154,10 @@ public class ConversationsOverviewFragment extends XmppFragment implements Enhan
@Override @Override
void refresh() { 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); this.activity.xmppConnectionService.populateWithOrderedConversations(this.conversations);
Conversation removed = this.swipedConversation.peek(); Conversation removed = this.swipedConversation.peek();
if (removed != null) { if (removed != null) {