mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-14 13:40:32 +00:00
The one-time link picker's old-core fallback set selectedProfile to the new user unconditionally, but the resync it does first is wrapped in a catch - so when the switch threw, the picker put its checkmark on a profile that is not active and cannot be selected, because the view then thinks it is already selected. Reading chatModel.currentUser instead is right in both cases and is a line shorter. The compose picker had the same question answered with a local switched flag. The active user answers it there too, which removes the flag, the two assignments that set it, and with them the mutable-local-in-a-@Sendable-closure problem that flag caused when it was first introduced.