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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ViewManager favorites don't refresh until next page reload #3846

Closed
TomTirapani opened this issue Dec 9, 2024 · 2 comments
Closed

ViewManager favorites don't refresh until next page reload #3846

TomTirapani opened this issue Dec 9, 2024 · 2 comments

Comments

@TomTirapani
Copy link
Member

If you have multiple ViewManagers that share their list of favourites by writing to a shared preference, e.g. {persistFavorites: {prefKey: 'foo'}}, changes to favorites made in one ViewManager are not reflected in the other until the page is fully reloaded. Refreshing the ViewManager model is not enough to pick up the changes.

I think we should be able to resolve this by reading the persisted favourites each time the menu is opened (or at the very least when the model is refreshed).

@amcclain
Copy link
Member

Covered in #3854 - "Pinned view state should be persisted in a similar manner as views so they are refreshed at the same time."

Note that "pinned" is new language for previous "favorites," as it now controls overall visibility in the Hoist-provided menu component.

To avoid this exact discrepancy, we plan to store that pinned state in another "user metadata" blob - one per user - that we can load and refresh at the same time as the other views. Also in that ticket is an enhancement to refresh each time the menu is opened, ensuring the user always sees a consistent / updated set of pinned views.

@amcclain
Copy link
Member

Covered in #3854 - "Pinned view state should be persisted in a similar manner as views so they are refreshed at the same time."

Note that "pinned" is new language for previous "favorites," as it now controls overall visibility in the Hoist-provided menu component.

To avoid this exact discrepancy, we plan to store that pinned state in another "user metadata" blob - one per user - that we can load and refresh at the same time as the other views. Also in that ticket is an enhancement to refresh each time the menu is opened, ensuring the user always sees a consistent / updated set of pinned views.

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

No branches or pull requests

2 participants