File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
package/src/components/MessageList Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -413,6 +413,14 @@ const MessageListWithContext = <
413413 const unreadIndicatorDate = channelUnreadState ?. last_read . getTime ( ) ;
414414 const lastItemDate = lastItemCreatedAt . getTime ( ) ;
415415
416+ if (
417+ ! channel . state . messagePagination . hasPrev &&
418+ processedMessageList [ processedMessageList . length - 1 ] . id === lastItem . item . id
419+ ) {
420+ setIsUnreadNotificationOpen ( false ) ;
421+ return ;
422+ }
423+
416424 if ( unreadIndicatorDate && lastItemDate > unreadIndicatorDate ) {
417425 setIsUnreadNotificationOpen ( true ) ;
418426 } else {
@@ -466,8 +474,7 @@ const MessageListWithContext = <
466474 return ( ) => {
467475 listener ?. unsubscribe ( ) ;
468476 } ;
469- // eslint-disable-next-line react-hooks/exhaustive-deps
470- } , [ ] ) ;
477+ } , [ channel , markRead , scrollToBottomButtonVisible ] ) ;
471478
472479 useEffect ( ( ) => {
473480 const lastReceivedMessage = getLastReceivedMessage ( processedMessageList ) ;
@@ -636,7 +643,7 @@ const MessageListWithContext = <
636643 { renderMessage }
637644 </ View >
638645 ) }
639- { showUnreadSeparator && < InlineUnreadIndicator /> }
646+ { showUnreadUnderlay && < InlineUnreadIndicator /> }
640647 </ View >
641648 ) ;
642649 } ;
You can’t perform that action at this time.
0 commit comments