From 89ad9be7cbf1f6bd48d033bafafc82922c6b9460 Mon Sep 17 00:00:00 2001 From: Narasimha-sc <166327228+Narasimha-sc@users.noreply.github.com> Date: Sat, 17 Oct 2026 21:14:17 +0000 Subject: [PATCH] desktop: open a pending connection's "Learn more" and "Incognito" pages once On desktop the connection view stays clickable in the center pane, so each click on these rows pushed another modal onto the right pane. Close the right-pane modals first, as ChatView does when the connection opens. The page is closed and shown again in one event, so its content is keyed by its ModalData to start fresh. Desktop only: on Android the view can itself be the open modal of the shared manager ("Set contact name"), and the new page already covers the row. Fixes #6270 --- .../common/views/newchat/ContactConnectionInfoView.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/newchat/ContactConnectionInfoView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/newchat/ContactConnectionInfoView.kt index f6109778dc..82cffbb384 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/newchat/ContactConnectionInfoView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/newchat/ContactConnectionInfoView.kt @@ -66,8 +66,9 @@ fun ContactConnectionInfoView( deleteConnection = { deleteContactConnectionAlert(rhId, contactConnection, chatModel, close) }, onLocalAliasChanged = { setContactAlias(rhId, contactConnection, it, chatModel) }, learnMore = { + if (appPlatform.isDesktop) ModalManager.end.closeModals() ModalManager.end.showModalCloseable { close -> - AddContactLearnMore(close) + key(this) { AddContactLearnMore(close) } } } ) @@ -90,7 +91,10 @@ private fun ContactConnectionInfoLayout( SettingsActionItemWithContent( icon = painterResource(MR.images.ic_theater_comedy_filled), text = null, - click = { ModalManager.end.showModal { IncognitoView() } }, + click = { + if (appPlatform.isDesktop) ModalManager.end.closeModals() + ModalManager.end.showModal { key(this) { IncognitoView() } } + }, iconColor = Indigo, extraPadding = false ) {