Skip to content

Commit 1b1b77a

Browse files
committed
fix: initial scrolling to first unread message on v5
1 parent 0a1a664 commit 1b1b77a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

package/src/components/Channel/Channel.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export const reactionData: ReactionData[] = [
203203
* If count of unread messages is less than 4, then no need to scroll to first unread message,
204204
* since first unread message will be in visible frame anyways.
205205
*/
206-
const scrollToFirstUnreadThreshold = 4;
206+
const scrollToFirstUnreadThreshold = 0;
207207

208208
const defaultThrottleInterval = 500;
209209
const defaultDebounceInterval = 500;
@@ -1042,6 +1042,7 @@ const ChannelWithContext = <
10421042
},
10431043
() => {
10441044
if (unreadMessageIdToScrollTo) {
1045+
setTargetedMessage(unreadMessageIdToScrollTo);
10451046
restartSetsMergeFuncRef.current();
10461047
}
10471048
},

0 commit comments

Comments
 (0)