mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-01 14:27:27 +00:00
ios: fix ocassional error on getSubsTotal (#5021)
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user