null check for conversation

This commit is contained in:
Daniel Gultsch 2018-03-30 12:26:10 +02:00
parent d27d9d9366
commit 2442dabb2a

View file

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