From cebb4aa93b14f39608fa10c01cf7b5adeda738e4 Mon Sep 17 00:00:00 2001 From: Diogo Date: Thu, 10 Oct 2024 18:55:37 +0100 Subject: [PATCH] ios: fix ocassional error on getSubsTotal (#5021) --- apps/ios/Shared/Views/ChatList/ChatListView.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/ios/Shared/Views/ChatList/ChatListView.swift b/apps/ios/Shared/Views/ChatList/ChatListView.swift index 4edc8a45f1..a1b40aadbe 100644 --- a/apps/ios/Shared/Views/ChatList/ChatListView.swift +++ b/apps/ios/Shared/Views/ChatList/ChatListView.swift @@ -437,7 +437,7 @@ struct SubsStatusIndicator: View { private func startTask() { task = Task { while !Task.isCancelled { - if AppChatState.shared.value == .active { + if AppChatState.shared.value == .active, ChatModel.shared.chatRunning == true { do { let (subs, hasSess) = try await getAgentSubsTotal() await MainActor.run {