feat(server): user preferences (#9736)

* refactor(server): user endpoints

* feat(server): user preferences

* mobile: user preference

* wording

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
Jason Rasmussen
2024-05-27 22:16:53 -04:00
committed by GitHub
parent 1f9158c545
commit 0fc6d69824
39 changed files with 1392 additions and 327 deletions

View File

@@ -21,10 +21,11 @@ class CurrentUserProvider extends StateNotifier<User?> {
refresh() async {
try {
final user = await _apiService.userApi.getMyUser();
final userPreferences = await _apiService.userApi.getMyPreferences();
if (user != null) {
Store.put(
StoreKey.currentUser,
User.fromUserDto(user),
User.fromUserDto(user, userPreferences),
);
}
} catch (_) {}