Skip to content

Commit 3ee8231

Browse files
committed
refactor: remove redundant use of client from jumpToFirstUnreadMessage function
1 parent 09832d1 commit 3ee8231

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/Channel/Channel.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ const ChannelInner = <
787787

788788
const jumpToFirstUnreadMessage = useCallback(
789789
async (queryMessageLimit = DEFAULT_JUMP_TO_PAGE_SIZE) => {
790-
if (!(client.user && channelUnreadUiState?.unread_messages)) return;
790+
if (!channelUnreadUiState?.unread_messages) return;
791791
let lastReadMessageId = channelUnreadUiState?.last_read_message_id;
792792
let firstUnreadMessageId = channelUnreadUiState?.first_unread_message_id;
793793
let isInCurrentMessageSet = false;
@@ -907,7 +907,7 @@ const ChannelInner = <
907907
dispatch({ type: 'clearHighlightedMessage' });
908908
}, 500);
909909
},
910-
[addNotification, channel, client, loadMoreFinished, t, channelUnreadUiState],
910+
[addNotification, channel, loadMoreFinished, t, channelUnreadUiState],
911911
);
912912

913913
const deleteMessage = useCallback(

0 commit comments

Comments
 (0)