Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃惔] Go back on account switches #4012

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

haileyok
Copy link
Member

No description provided.

Copy link

render bot commented May 14, 2024

Copy link

Old size New size Diff
6.84 MB 6.84 MB 1 B (0.00%)

@@ -31,10 +32,31 @@ type Props = NativeStackScreenProps<
CommonNavigatorParams,
'MessagesConversation'
>

let prevDid: string | undefined
Copy link
Member

Choose a reason for hiding this comment

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

A bit odd having state outside of React? Shouldn't this be in a ref?

Copy link
Member Author

Choose a reason for hiding this comment

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

It can't be because the whole tree is gettin nuked when see switch accounts. Ran into the same problem with notifications as well.

@mozzius
Copy link
Member

mozzius commented May 15, 2024

Talked to Hailey about this, this is fine-ish but it would be much better to have a useWillSwitchAccounts(callback) hook to run this logic

@haileyok
Copy link
Member Author

Yea this would be useful in some other notification logic too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants