From 975dbc2710022729773d7152bd3eed3f0cc95583 Mon Sep 17 00:00:00 2001 From: Nuno Vieira Date: Thu, 31 Oct 2024 18:17:05 +0000 Subject: [PATCH 1/3] Do not make loading view dependent of network reachability --- .../ChatChannelList/ChatChannelListViewModel.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Sources/StreamChatSwiftUI/ChatChannelList/ChatChannelListViewModel.swift b/Sources/StreamChatSwiftUI/ChatChannelList/ChatChannelListViewModel.swift index fd3f580f..8908491b 100644 --- a/Sources/StreamChatSwiftUI/ChatChannelList/ChatChannelListViewModel.swift +++ b/Sources/StreamChatSwiftUI/ChatChannelList/ChatChannelListViewModel.swift @@ -310,9 +310,7 @@ open class ChatChannelListViewModel: ObservableObject, ChatChannelListController updateChannels() - if channels.isEmpty { - loading = networkReachability.isNetworkAvailable() - } + loading = channels.isEmpty controller?.synchronize { [weak self] error in guard let self = self else { return } From 6ef263545ce1e20744a64760a1e8f691d923df88 Mon Sep 17 00:00:00 2001 From: Nuno Vieira Date: Thu, 31 Oct 2024 18:26:48 +0000 Subject: [PATCH 2/3] Fix not updating the channels after the sync call --- .../ChatChannelList/ChatChannelListViewModel.swift | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Sources/StreamChatSwiftUI/ChatChannelList/ChatChannelListViewModel.swift b/Sources/StreamChatSwiftUI/ChatChannelList/ChatChannelListViewModel.swift index 8908491b..3ac38037 100644 --- a/Sources/StreamChatSwiftUI/ChatChannelList/ChatChannelListViewModel.swift +++ b/Sources/StreamChatSwiftUI/ChatChannelList/ChatChannelListViewModel.swift @@ -320,9 +320,7 @@ open class ChatChannelListViewModel: ObservableObject, ChatChannelListController self.channelAlertType = .error } else { // access channels - if self.selectedChannel == nil { - self.updateChannels() - } + self.updateChannels() self.checkForDeeplinks() } } From a0e6a545694d254f204a5193b8fac774d858940a Mon Sep 17 00:00:00 2001 From: Nuno Vieira Date: Mon, 4 Nov 2024 20:06:07 +0000 Subject: [PATCH 3/3] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bc07d600..34c776cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### 🐞 Fixed - Fix crash when opening message overlay in iPad with a TabBar [#627](https://github.com/GetStream/stream-chat-swiftui/pull/627) - Only show Leave Group option if the user has leave-channel permission [#633](https://github.com/GetStream/stream-chat-swiftui/pull/633) +- Fix Channel List stuck in Empty View State in rare conditions [#639](https://github.com/GetStream/stream-chat-swiftui/pull/639) # [4.65.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.65.0) _October 18, 2024_