From acba0b4a7d2db07c5009b3072d16f666e2aa3c86 Mon Sep 17 00:00:00 2001 From: Avently <7953703+avently@users.noreply.github.com> Date: Thu, 1 Aug 2024 17:09:26 +0900 Subject: [PATCH] android, desktop: chats context enhancements --- .../commonMain/kotlin/chat/simplex/common/model/ChatModel.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt index a717a8cd0c..3c41c53859 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/model/ChatModel.kt @@ -194,8 +194,8 @@ object ChatModel { } } - suspend fun withChats(action: suspend ChatsContext.() -> T): T = updatingChatsMutex.withLock { - chatsContext.action() + suspend fun withChats(action: suspend ChatsContext.(ChatsContext) -> T): T = updatingChatsMutex.withLock { + chatsContext.action(chatsContext) } class ChatsContext {