From 6be67f2d3f3cc3efcce3fb1a02588c70aab525b1 Mon Sep 17 00:00:00 2001 From: Aman Harwara Date: Fri, 16 Feb 2024 19:32:39 +0530 Subject: [PATCH] refactor: use wrapped storage --- packages/snjs/lib/Services/Preferences/PreferencesService.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/snjs/lib/Services/Preferences/PreferencesService.ts b/packages/snjs/lib/Services/Preferences/PreferencesService.ts index 3288fc93520..14661f2df7c 100644 --- a/packages/snjs/lib/Services/Preferences/PreferencesService.ts +++ b/packages/snjs/lib/Services/Preferences/PreferencesService.ts @@ -25,7 +25,6 @@ import { ApplicationStageChangedEventPayload, StorageServiceInterface, StorageKey, - StorageValueModes, } from '@standardnotes/services' import { ContentType } from '@standardnotes/domain-core' @@ -84,7 +83,7 @@ export class PreferencesService void this.notifyEvent(PreferencesServiceEvent.PreferencesChanged) } } else if (stage === ApplicationStage.StorageDecrypted_09) { - this.localPreferences = this.storage.getValue(StorageKey.LocalPreferences, StorageValueModes.Nonwrapped) ?? {} + this.localPreferences = this.storage.getValue(StorageKey.LocalPreferences) ?? {} void this.notifyEvent(PreferencesServiceEvent.LocalPreferencesChanged) } } @@ -108,7 +107,7 @@ export class PreferencesService setLocalValue(key: K, value: LocalPrefValue[K]): void { this.localPreferences[key] = value - this.storage.setValue(StorageKey.LocalPreferences, this.localPreferences, StorageValueModes.Nonwrapped) + this.storage.setValue(StorageKey.LocalPreferences, this.localPreferences) void this.notifyEvent(PreferencesServiceEvent.LocalPreferencesChanged) }