diff --git a/apps/ios/Shared/Views/ChatList/ChatListView.swift b/apps/ios/Shared/Views/ChatList/ChatListView.swift index 1cb00e3a4d..8a3a0cf37b 100644 --- a/apps/ios/Shared/Views/ChatList/ChatListView.swift +++ b/apps/ios/Shared/Views/ChatList/ChatListView.swift @@ -266,13 +266,19 @@ struct SubsStatusIndicator: View { @AppStorage(DEFAULT_SHOW_SUBSCRIPTION_PERCENTAGE) private var showSubscriptionPercentage = false var body: some View { - Button { - showServersSummary = true - } label: { - HStack(spacing: 4) { - SubscriptionStatusIndicatorView(subs: subs, hasSess: hasSess) - if showSubscriptionPercentage { - SubscriptionStatusPercentageView(subs: subs, hasSess: hasSess) + ZStack { + if subs.total == 0 && !hasSess { + EmptyView() + } else { + Button { + showServersSummary = true + } label: { + HStack(spacing: 4) { + SubscriptionStatusIndicatorView(subs: subs, hasSess: hasSess) + if showSubscriptionPercentage { + SubscriptionStatusPercentageView(subs: subs, hasSess: hasSess) + } + } } } } @@ -282,8 +288,9 @@ struct SubsStatusIndicator: View { .onDisappear { stopTimer() } - .sheet(isPresented: $showServersSummary) { + .appSheet(isPresented: $showServersSummary) { ServersSummaryView() + .environment(\EnvironmentValues.refresh as! WritableKeyPath, nil) } } 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 707a183dd9..7b7c07bef5 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 @@ -359,8 +359,12 @@ fun SubscriptionStatusIndicator(click: (() -> Unit)) { } } - SimpleButtonFrame(click = click) { - SubscriptionStatusIndicatorView(subs = subs, hasSess = hasSess) + if (subs.total == 0 && !hasSess) { + Box {} + } else { + SimpleButtonFrame(click = click) { + SubscriptionStatusIndicatorView(subs = subs, hasSess = hasSess) + } } }