preferences saved and restored after logout

This commit is contained in:
Frede Hundewadt 2023-01-25 16:31:51 +01:00
parent cbfebdf7fd
commit 709ca5d90b
2 changed files with 4 additions and 2 deletions

View file

@ -120,7 +120,9 @@ namespace Wonky.Client.Services
{ {
((AuthStateProvider)_authStateProvider).NotifyUserLogout(); ((AuthStateProvider)_authStateProvider).NotifyUserLogout();
_client.DefaultRequestHeaders.Authorization = null; _client.DefaultRequestHeaders.Authorization = null;
var backupPreferences = _localStorage.GetItemAsync<UserPref>("preferences");
await _localStorage.ClearAsync(); await _localStorage.ClearAsync();
await _localStorage.SetItemAsync("preferences", backupPreferences);
} }
public async Task<UserInfoView> UserInfo(bool write = false) public async Task<UserInfoView> UserInfo(bool write = false)

View file

@ -1,7 +1,7 @@
{ {
"appInfo": { "appInfo": {
"name": "Wonky Online", "name": "Wonky Online",
"version": "0.107.3", "version": "0.108.1",
"rc": true, "rc": true,
"sandBox": false, "sandBox": false,
"image": "grumpy-coder.png" "image": "grumpy-coder.png"
@ -19,7 +19,7 @@
} }
}, },
"apiConfig": { "apiConfig": {
"baseUrl": "https://zeta.innotec.dk", "baseUrl": "https://dev.innotec.dk",
"catalog": "api/v2/catalog/country", "catalog": "api/v2/catalog/country",
"crmCustomers": "api/v2/crm/companies", "crmCustomers": "api/v2/crm/companies",
"crmInventoryExt": "history/inventory", "crmInventoryExt": "history/inventory",