Skip to content

Commit 6738d44

Browse files
committed
fix: make sure to call loadMoreFinished
1 parent 3ee8231 commit 6738d44

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Diff for: src/components/Channel/Channel.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -833,9 +833,11 @@ const ChannelInner = <
833833
loadMoreFinished(hasMoreMessages, channel.state.messages);
834834
return;
835835
}
836+
836837
const firstMessageWithCreationDate = messages.find((msg) => msg.created_at);
837838
if (!(messages.length && firstMessageWithCreationDate)) {
838839
addNotification(t('Failed to jump to the first unread message'), 'error');
840+
loadMoreFinished(hasMoreMessages, channel.state.messages);
839841
return;
840842
}
841843
const firstMessageTimestamp = new Date(
@@ -850,6 +852,7 @@ const ChannelInner = <
850852
lastReadMessageId = result.target?.id;
851853
hasMoreMessages = result.index >= Math.floor(queryMessageLimit / 2);
852854
}
855+
loadMoreFinished(hasMoreMessages, channel.state.messages);
853856
}
854857
}
855858

0 commit comments

Comments
 (0)