mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-09-10 00:46:50 +00:00
clear() + addAll() ran from Main while changeActiveUser_ does the same pair from withBGApi, so a notification action switching user mid-creation could interleave them and leave chatModel.users duplicated or short. The refresh had nothing to add over the row already appended - newUser is the API's own record and a new profile has no unread messages - so it is gone. changeProfile is reached from the create flow and from a plain row tap; routing both through alertAfterDismissal delayed row-tap errors half a second for no sheet, detaching them from the tap. Pass dismissingSheet instead. Also gate the remaining ungated incognito write, matching its sibling and both Kotlin ones.