mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-18 09:37:34 +00:00
desktop: fix app without user crashing when trying to get subscription data (#4551)
This commit is contained in:
+6
-4
@@ -291,10 +291,12 @@ fun SubscriptionStatusIndicator(click: (() -> Unit)) {
|
||||
val scope = rememberCoroutineScope()
|
||||
|
||||
suspend fun setSubsTotal() {
|
||||
val r = chatModel.controller.getAgentSubsTotal(chatModel.remoteHostId())
|
||||
if (r != null) {
|
||||
subs = r.first
|
||||
hasSess = r.second
|
||||
if (chatModel.currentUser.value != null) {
|
||||
val r = chatModel.controller.getAgentSubsTotal(chatModel.remoteHostId())
|
||||
if (r != null) {
|
||||
subs = r.first
|
||||
hasSess = r.second
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -719,7 +719,9 @@ fun ModalData.ServersSummaryView(rh: RemoteHostInfo?, serversSummary: MutableSta
|
||||
val scope = rememberCoroutineScope()
|
||||
|
||||
suspend fun setServersSummary() {
|
||||
serversSummary.value = chatModel.controller.getAgentServersSummary(chatModel.remoteHostId())
|
||||
if (chatModel.currentUser.value != null) {
|
||||
serversSummary.value = chatModel.controller.getAgentServersSummary(chatModel.remoteHostId())
|
||||
}
|
||||
}
|
||||
|
||||
LaunchedEffect(Unit) {
|
||||
|
||||
Reference in New Issue
Block a user