fix crash

This commit is contained in:
kosyak 2023-10-30 19:59:43 +01:00
parent b5b47f8d7d
commit 11316a949d

View file

@ -302,7 +302,7 @@ public class ConversationFragment extends XmppFragment
toggleScrollDownButton(view); toggleScrollDownButton(view);
synchronized (ConversationFragment.this.messageList) { synchronized (ConversationFragment.this.messageList) {
boolean paginateBackward = firstVisibleItem < 5; boolean paginateBackward = firstVisibleItem < 5;
boolean paginationForward = conversation.isInHistoryPart() && firstVisibleItem + visibleItemCount + 5 > totalItemCount; boolean paginationForward = conversation != null && conversation.isInHistoryPart() && firstVisibleItem + visibleItemCount + 5 > totalItemCount;
loadMoreMessages(paginateBackward, paginationForward, view); loadMoreMessages(paginateBackward, paginationForward, view);
} }
} }