mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-11 22:38:01 +00:00
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
This commit is contained in:
1 parent
139ce5f8cc
commit
89ad9be7cb
1 file changed
+6
-2
+6
-2
@@ -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
|
||||
) {
|
||||
|
||||
Reference in new issue
Block a user