Skip to content

Commit a782821

Browse files
Fixed bug with updating channels when offscreen
1 parent c257010 commit a782821

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/StreamChatSwiftUI/ChatChannelList/ChatChannelListViewModel.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,9 @@ open class ChatChannelListViewModel: ObservableObject, ChatChannelListController
268268
self.channelAlertType = .error
269269
} else {
270270
// access channels
271-
self.updateChannels()
271+
if self.selectedChannel == nil {
272+
self.updateChannels()
273+
}
272274
self.checkForDeeplinks()
273275
self.setInitialChannelIfSplitView()
274276
}

0 commit comments

Comments
 (0)