File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
package/src/components/MessageList Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -533,7 +533,6 @@ const MessageListWithContext = <
533533 const shouldMarkRead = ( ) => {
534534 return (
535535 ! channelUnreadState ?. first_unread_message_id &&
536- ! threadList &&
537536 ! scrollToBottomButtonVisible &&
538537 client . user ?. id &&
539538 ! hasReadLastMessage ( channel , client . user ?. id )
@@ -542,6 +541,7 @@ const MessageListWithContext = <
542541
543542 const handleEvent = async ( event : Event < StreamChatGenerics > ) => {
544543 const mainChannelUpdated = ! event . message ?. parent_id || event . message ?. show_in_channel ;
544+ console . log ( mainChannelUpdated , shouldMarkRead ( ) ) ;
545545 // When the scrollToBottomButtonVisible is true, we need to manually update the channelUnreadState.
546546 if ( scrollToBottomButtonVisible || channelUnreadState ?. first_unread_message_id ) {
547547 setChannelUnreadState ( ( prev ) => {
@@ -561,6 +561,7 @@ const MessageListWithContext = <
561561 } ;
562562 } ) ;
563563 } else if ( mainChannelUpdated && shouldMarkRead ( ) ) {
564+ console . log ( 'marking read' ) ;
564565 await markRead ( ) ;
565566 }
566567 } ;
@@ -618,6 +619,7 @@ const MessageListWithContext = <
618619 setTimeout ( ( ) => {
619620 channelResyncScrollSet . current = true ;
620621 if ( channel . countUnread ( ) > 0 ) {
622+ console . log ( 'marking read' ) ;
621623 markRead ( ) ;
622624 }
623625 } , 500 ) ;
You can’t perform that action at this time.
0 commit comments