diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/WelcomeView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/WelcomeView.kt index ab0117414b..de36fea1a4 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/WelcomeView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/WelcomeView.kt @@ -357,6 +357,7 @@ private fun CreateFirstProfileDesktop(chatModel: ChatModel, close: () -> Unit) { fun createProfileForInvitation(rhId: Long?, onCreated: (User) -> Unit) { val modalManager = ModalManager.fullscreen + if (modalManager.isLastModalOpen(ModalViewId.CONTEXT_USER_PICKER_NEW_PROFILE)) return modalManager.showModalCloseable(id = ModalViewId.CONTEXT_USER_PICKER_NEW_PROFILE) { close -> CreateProfile(chatModel, close, createProfile = { displayName, shortDescr, image -> withBGApi { diff --git a/plans/2026-07-30-new-profile-for-invitation.md b/plans/2026-07-30-new-profile-for-invitation.md index 7684117981..147ac813db 100644 --- a/plans/2026-07-30-new-profile-for-invitation.md +++ b/plans/2026-07-30-new-profile-for-invitation.md @@ -175,11 +175,11 @@ workaround here: `CreateProfile` and shown on the form, which stays open. Fixing this needs either a fixed delay after dismissal or the presenting controller's completion handler, which is not reachable from where these alerts are raised. -- **The back-out guard has a ~250ms residual.** `closeModal` leaves a dismissed modal in - `modalViews` until its close animation ends, so `isLastModalOpen` still reports it open - for that window. Backing out and having the create land inside it still reassigns. Closing - that needs a `toRemove`-aware variant of the check, which is more machinery than the - remaining window is worth. +- **Both `isLastModalOpen` guards have a ~250ms residual.** `closeModal` leaves a dismissed + modal in `modalViews` until its close animation ends, so the check still reports it open + for that window: backing out and having the create land inside it still reassigns, and + re-opening the form within it is swallowed. Closing that needs a `toRemove`-aware variant + of the check, which is more machinery than the remaining windows are worth. - **Surface 2's `filteredProfiles` is `remember`ed on the search text only**, so on desktop (where the picker is not disposed under the form) a profile created while it is open is not listed. Invisible today because `selectProfile`