File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
package/src/components/Channel Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -985,6 +985,14 @@ const ChannelWithContext = <
985985 syncingChannelRef . current = true ;
986986 setError ( false ) ;
987987
988+ if ( channelMessagesState ?. messages ) {
989+ await channel ?. watch ( {
990+ messages : {
991+ limit : channelMessagesState . messages . length + 30 ,
992+ } ,
993+ } ) ;
994+ }
995+
988996 const parseMessage = ( message : FormatMessageResponse < StreamChatGenerics > ) =>
989997 ( {
990998 ...message ,
@@ -1003,6 +1011,7 @@ const ChannelWithContext = <
10031011 if ( failedMessages ?. length ) {
10041012 channel . state . addMessagesSorted ( failedMessages ) ;
10051013 }
1014+ channel . state . setIsUpToDate ( true ) ;
10061015 } else {
10071016 await reloadThread ( ) ;
10081017
@@ -1042,7 +1051,7 @@ const ChannelWithContext = <
10421051 if ( enableOfflineSupport ) {
10431052 connectionChangedSubscription = DBSyncManager . onSyncStatusChange ( ( statusChanged ) => {
10441053 if ( statusChanged ) {
1045- copyChannelState ( ) ;
1054+ connectionChangedHandler ( ) ;
10461055 }
10471056 } ) ;
10481057 } else {
You can’t perform that action at this time.
0 commit comments