Skip to content

fix: switch account in all SelectChat dialogs#6279

Open
nicodh wants to merge 3 commits intomainfrom
switch-profile-in-select-chat
Open

fix: switch account in all SelectChat dialogs#6279
nicodh wants to merge 3 commits intomainfrom
switch-profile-in-select-chat

Conversation

@nicodh
Copy link
Copy Markdown
Member

@nicodh nicodh commented Apr 19, 2026

resolves #6270

@nicodh nicodh added the catching up with other clients catching up with features that the other clients (mainly iOS and android) already have label Apr 19, 2026
Comment thread packages/frontend/src/components/dialogs/SelectChat/index.tsx
listFlags={C.DC_GCL_FOR_FORWARDING | C.DC_GCL_NO_SPECIALS}
accountId={targetAccountId}
accountSwitch={accountSwitch}
key={targetAccountId}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This re-introduces the bug that we discussed in #5916 (comment).

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So maybe it's time then to make useLogicVirtualChatList account switch aware. I added a commit that resets the chat cache on account switch

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just wrap the lower part of the SelectChat dialog in key={accountId} again?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(but yep, then the state of the lower part (useChatList and stuff) would also need be in a separate component)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I splitted the Select Chat in 2 components now

Comment thread packages/frontend/src/components/dialogs/SelectChat/index.tsx Outdated
@nicodh nicodh force-pushed the switch-profile-in-select-chat branch from 158a053 to 32be2fc Compare April 22, 2026 10:33
@nicodh nicodh force-pushed the switch-profile-in-select-chat branch from 32be2fc to 46efb3c Compare April 22, 2026 10:35
@WofWca WofWca self-requested a review April 22, 2026 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

catching up with other clients catching up with features that the other clients (mainly iOS and android) already have

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch profile is missing in send to chat dialog from webxdc

2 participants