mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-09-10 22:26:52 +00:00
changeActiveUser_ writes currentUser inside its mutex before it lists users, and changeActiveUserAsync_ runs both API calls before the MainActor.run that assigns m.users - so a throw in between leaves the model pointing at a profile its own list does not contain. The comment claiming the resync covers it was wrong on exactly that path. Also rethrow CancellationException rather than reporting it as a failure, hop to main before showAlert on the immediate path (it runs inside a Task, and only alertAfterDismissal was hopping), and put the new row's divider under it - reverseLayout flips items, not the content of one, so it was drawing a line along the picker's top edge.