Files
simplex-chat/apps
Narasimha-sc 0735bd2c6e desktop: after a chat switch, chat info shows the previous chat's security code, link or members (#7926)
* desktop: reload chat info when it is shown for another chat

The info pane keeps the values it last loaded. When the pane is composed
again for another chat - after clicking another chat with a page such as
"Verify security code" open over it, or when switching between a contact
and a group - KeyChangeEffect takes the new chat id as its starting key, so
nothing is reloaded: "Verify security code" opened from the new contact's
info showed the previous contact's code, and a group's info missed its
members.

Remember which chat the loaded values belong to and reload whenever the
shown chat differs from it.

Fixes #5135

* plans: desktop chat info stale after chat switch (#5135)

* desktop: don't show another chat's info while the shown chat loads

When the info pane showed a chat other than the one its values were
loaded for, it reloaded them, but until the reload returned it showed the
previous chat's values: "Verify security code" opened the previous
contact's code, and a group showed the previous group's link, so "Group
link" opened and shared another group's link.

Start the contact info, security code and group link empty when they
belong to another chat. Hide the "Create group link" / "Group link" row
and disable the channel "Link" button until the link is loaded: with no
link yet, both open the link page, which creates a link when it gets
none, and for a group that already has one the core creates a server
queue before failing with a duplicate link error.

* desktop: keep a late group link update from replacing another chat's link

A link created, changed or deleted on the "Group link" page finishes in
the background. If the user switched chats meanwhile and the pane already
loaded the next group, the update replaced that group's stored link, and
the next time the pane was composed for it, it showed the previous group's
link, or no link after a delete.

Store the update only while the stored values belong to the group the
update came from.

* desktop: reload group info when its members were cleared

Switching chats clears the group members, and the preload skips storing
them when another chat is open when they arrive. Clicking info on group A,
then another chat and back to A before the preload finished, opened A's
info with the preloaded values marked as A's, so nothing was reloaded and
the members list showed only the user.

Reload the group info also when its members are not loaded.

* plans: chat info while it reloads, late link update, cleared members (#5135)

* desktop: hide channel owner link rows until the link is loaded

* plans: test of the channel owner rows, which builds the tables are for

* plans: restructure chat info plan into problem, cause, fix and scope

* plans: correct the Android and iOS scope of the chat info plan

* plans: chat info plan wording
2026-10-31 20:18:45 +00:00
..