ios: asychronous subscription updates (#4707)

* ios: asychronous subscription updates

* cleanup
This commit is contained in:
Arturs Krumins authored and GitHub committed 2024-08-17 13:26:56 +01:00
1 parent 3740805125
commit 3a0921c093
2 files changed
+23 -20

No files matched your search

+2 -2
View File
@@ -1420,9 +1420,9 @@ func apiGetVersion() throws -> CoreVersionInfo {
throw r
}
func getAgentSubsTotal() throws -> (SMPServerSubs, Bool) {
func getAgentSubsTotal() async throws -> (SMPServerSubs, Bool) {
let userId = try currentUserId("getAgentSubsTotal")
let r = chatSendCmdSync(.getAgentSubsTotal(userId: userId), log: false)
let r = await chatSendCmd(.getAgentSubsTotal(userId: userId))
if case let .agentSubsTotal(_, subsTotal, hasSession) = r { return (subsTotal, hasSession) }
logger.error("getAgentSubsTotal error: \(String(describing: r))")
throw r