From 1b044237457e3a2591fa2edaeb994bacbf96eec5 Mon Sep 17 00:00:00 2001 From: Stanislav Dmitrenko <7953703+avently@users.noreply.github.com> Date: Tue, 28 May 2024 22:35:43 +0700 Subject: [PATCH] android, desktop: close notes tab on switching between chats (#4246) --- .../kotlin/chat/simplex/common/views/chat/ChatView.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt index 3b3060c81a..03d4e30a6c 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt @@ -200,6 +200,10 @@ fun ChatView(chatId: String, chatModel: ChatModel, onComposed: suspend (chatId: link = it preloadedLink = it }, close) + } else { + LaunchedEffect(Unit) { + close() + } } } }