Skip to content

Rework useUserPreference to use directly redux

Valentin Valls requested to merge use-preference-redux-look into main

Closes daiquiri-tomo#377 (closed)

Rework useUserPreference to use direct access to the redux store.

Previously 2-3 level of caches was used + timestamp to avoid bounces.

The store now provides a UPDATE_USER_PREFERENCES to handle everything in the atomic stage of the Redux. This allow to drop all the complexity. And fixes at the same time few problems when the update was too close.

Unfortunately the server storage of the preferences looks to not work anymore. I don't really know how this is supposed to be synchronized.

Edited by Valentin Valls

Merge request reports