Files
simplex-chat/apps
Narasimha-sc 51cb747d2a ios: derive the switch outcome from the active user instead of a flag
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.
2026-08-06 19:15:56 +00:00
..