From a8f0f161214b80187ac91fc0c3a62e1b02aecdf6 Mon Sep 17 00:00:00 2001 From: KoloMl Date: Sat, 23 Nov 2024 00:47:56 +0400 Subject: [PATCH] Fixed missing backward synchronization from browser storage to stores --- src/stores/misc-preferences.js | 6 +++++- src/stores/search-preferences.js | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/stores/misc-preferences.js b/src/stores/misc-preferences.js index c2dcb04..22eb309 100644 --- a/src/stores/misc-preferences.js +++ b/src/stores/misc-preferences.js @@ -10,5 +10,9 @@ Promise.allSettled([ ]).then(() => { fullScreenViewerEnabled.subscribe(value => { void miscSettings.setFullscreenViewerEnabled(value); - }) + }); + + miscSettings.subscribe(settings => { + fullScreenViewerEnabled.set(settings.fullscreenViewer); + }); }); diff --git a/src/stores/search-preferences.js b/src/stores/search-preferences.js index f485261..5d01486 100644 --- a/src/stores/search-preferences.js +++ b/src/stores/search-preferences.js @@ -21,4 +21,9 @@ Promise.allSettled([ searchPropertiesSuggestionsPosition.subscribe(value => { void searchSettings.setPropertiesSuggestionsPosition(value); }); + + searchSettings.subscribe(settings => { + searchPropertiesSuggestionsEnabled.set(settings.suggestProperties); + searchPropertiesSuggestionsPosition.set(settings.suggestPropertiesPosition); + }); })