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 {