mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-14 15:50:09 +00:00
Opening someone's link prepares a chat and shows the profile picker above the compose box. It listed existing profiles and Incognito, so connecting as someone new meant leaving the invitation, creating a profile in settings, and coming back to the link. Adds "Add profile" to that picker, reusing the existing users_add string. The profile is created without becoming active, so the profile that owns the prepared chat stays active for the reassignment, which then switches once - rather than switching away and back. The row is emitted last, so with the reversed layout it renders at the top of the expanded list with the current selection nearest the compose box. After switching, the chat is reopened explicitly: keepingChatId only preserves its place in the reloaded list, so without that the switch lands on the chat list of the new profile rather than the invitation it was chosen for. This applies to picking an existing profile too. The form is only dismissed once creation succeeds, so a rejected duplicate name does not discard what was typed. A dismissal guard keeps a back-tap during creation from switching the profile anyway, and the created profile is put into the picker list immediately so it stays visible if the reassignment fails. If the core activated the profile despite keepActiveUser - an older remote host ignoring the field - the reassignment would fail, so that case resyncs to what the host actually did instead. Updates the onboarding flow doc, which names the arguments of the command that gains the field.