From e16393ffec5efbccf158fde447984428b914f178 Mon Sep 17 00:00:00 2001 From: Tandashi <18377875+Tandashi@users.noreply.github.com> Date: Sun, 31 Oct 2021 18:53:44 +0100 Subject: [PATCH] feat: Make conversion to new settings easier --- src/util/store.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/util/store.ts b/src/util/store.ts index f2d5245..53d343e 100644 --- a/src/util/store.ts +++ b/src/util/store.ts @@ -1,5 +1,5 @@ const STORAGE_QUEUE_ID = 'syncQueue'; -const STORAGE_SETTINGS_ID = 'syncSettings-v2'; +const STORAGE_SETTINGS_ID = 'syncSettings'; const DEFAULT_SETTINGS: Settings = { showReactions: true, @@ -55,7 +55,10 @@ export default class Store { * Get the stored settings */ public static getSettings(): Settings { - return Store.getItem(STORAGE_SETTINGS_ID) || DEFAULT_SETTINGS; + return { + ...DEFAULT_SETTINGS, + ...Store.getItem(STORAGE_SETTINGS_ID), + }; } /**