-
Notifications
You must be signed in to change notification settings - Fork 3k
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clear out old cached policies #5023
Conversation
if (policyCollection[key]) { | ||
return; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAB: Is this space necessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I just prefer to pad if statements with new lines so things are less visually compressed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had one tiny NAB that you can take or leave, but I am still unclear how this will be updated if someone has deleted one of these policies in OldExpensify. What triggers AuthScreens::componentDidUpdate
in this scenario?
I believe that a page refresh is the only thing that would update that data (maybe a reconnection - but would have to look). We could create a new issue to see if that's a priority (and sync things up with web sockets, polling, refetch when visiting the settings page or something else), but it feels tangential to the issue reported by @MitchExpensify. |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by @joelbettner in version: 1.0.96-1 🚀
|
🚀 Deployed to production by @francoisl in version: 1.0.97-0 🚀
|
cc @deetergp
Details
I think maybe we did not implement this PR correctly probably because an assumption was made about
mergeCollection()
that would clear out old cached values. I will have to look into that at some point. But I'm not sure if it works that way.Fixed Issues
$ https://github.com/Expensify/Expensify/issues/174831
Tests / QA Steps
Tested On
Note: I am skipping testing on all platforms in the interest of saving time since I can't think of any reason why this code would run differently on native / does not touch UI.
Screenshots
Web
Mobile Web
Desktop
iOS
Android