From cb683d07061c0a718e65da8ba4e0eb2eea9686fa Mon Sep 17 00:00:00 2001 From: spaced4ndy <8711996+spaced4ndy@users.noreply.github.com> Date: Tue, 13 Aug 2024 13:14:27 +0400 Subject: [PATCH] ui: disable subs indicator when chat is stopped (#4672) --- apps/ios/Shared/Views/ChatList/ChatListView.swift | 1 + .../chat/simplex/common/views/chatlist/ChatListView.kt | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/ios/Shared/Views/ChatList/ChatListView.swift b/apps/ios/Shared/Views/ChatList/ChatListView.swift index 41539b0759..8c9d090890 100644 --- a/apps/ios/Shared/Views/ChatList/ChatListView.swift +++ b/apps/ios/Shared/Views/ChatList/ChatListView.swift @@ -341,6 +341,7 @@ struct SubsStatusIndicator: View { } } } + .disabled(ChatModel.shared.chatRunning != true) .onAppear { startTimer() } diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt index 73c549df8b..5862c73a4d 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt @@ -421,7 +421,10 @@ fun SubscriptionStatusIndicator(click: (() -> Unit)) { } } - SimpleButtonFrame(click = click) { + SimpleButtonFrame( + click = click, + disabled = chatModel.chatRunning.value != true + ) { SubscriptionStatusIndicatorView(subs = subs, hasSess = hasSess) } }