null check for conversation

This commit is contained in:
Daniel Gultsch 2018-03-30 12:26:10 +02:00
parent d27d9d9366
commit 2442dabb2a
1 changed files with 3 additions and 1 deletions

View File

@ -191,10 +191,12 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
}
private void toggleScrollDownButton(AbsListView listView) {
if (conversation == null) {
return;
}
if (scrolledToBottom(listView)) {
lastMessageUuid = null;
hideUnreadMessagesCount();
} else {
binding.scrollToBottomButton.setEnabled(true);
binding.scrollToBottomButton.setVisibility(View.VISIBLE);