diff --git a/src/services/auth/index.ts b/src/services/auth/index.ts index 64184eef..88c81583 100644 --- a/src/services/auth/index.ts +++ b/src/services/auth/index.ts @@ -57,7 +57,7 @@ export class Authentication implements IAuthenticationService { * load UserInfos in sync, and ensure it is an Object */ private readonly getInitUserInfoForCache = (): IUserInfos => { - let userInfosFromDisk = settings.getSync(`userInfo.${this.version}`) ?? {}; + let userInfosFromDisk = settings.getSync(`userInfos.${this.version}`) ?? {}; userInfosFromDisk = typeof userInfosFromDisk === 'object' && !Array.isArray(userInfosFromDisk) ? userInfosFromDisk : {}; return { ...defaultUserInfos, ...this.sanitizeUserInfo(userInfosFromDisk) }; }; diff --git a/src/services/preferences/index.ts b/src/services/preferences/index.ts index abf5a57a..b0c47f01 100755 --- a/src/services/preferences/index.ts +++ b/src/services/preferences/index.ts @@ -82,7 +82,7 @@ export class Preference implements IPreferenceService { this.cachedPreferences[key] = value; this.cachedPreferences = { ...this.cachedPreferences, ...this.sanitizePreference(this.cachedPreferences) }; - void settings.set(`preferences.${this.version}.${key}`, this.cachedPreferences[key]); + void settings.set(`preferences.${this.version}.${key}`, this.cachedPreferences[key] as any); this.reactWhenPreferencesChanged(key, value); this.updatePreferenceSubject(); @@ -107,7 +107,7 @@ export class Preference implements IPreferenceService { */ private async setPreferences(newPreferences: IPreferences): Promise { this.cachedPreferences = newPreferences; - await settings.set(`preferences.${this.version}`, { ...newPreferences }); + await settings.set(`preferences.${this.version}`, { ...newPreferences } as any); this.updatePreferenceSubject(); } diff --git a/src/services/workspaces/index.ts b/src/services/workspaces/index.ts index b6ff81a4..e87e3b69 100644 --- a/src/services/workspaces/index.ts +++ b/src/services/workspaces/index.ts @@ -311,7 +311,7 @@ export class Workspace implements IWorkspaceService { newImage.clone().resize(128, 128).quality(100).write(destinationPicturePath, resolve); }); const currentPicturePath = this.get(id)?.picturePath; - await this.update(id, { + this.update(id, { picturePath: destinationPicturePath, }); // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions