mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-06 03:34:40 +00:00
fix: settingsState saving all storage data to settingsState.data incorrectly
This commit is contained in:
@@ -65,6 +65,9 @@ async function init() {
|
|||||||
|
|
||||||
if (settingsState.onoff) {
|
if (settingsState.onoff) {
|
||||||
enableCurrentTheme()
|
enableCurrentTheme()
|
||||||
|
//console.log(await browser.storage.local.get())
|
||||||
|
//settingsState.bksliderinput = '10'
|
||||||
|
//console.log(await browser.storage.local.get())
|
||||||
|
|
||||||
// TEMP FIX for bug! -> this is a hack to get the injected.css file to have HMR in development mode as this import system is currently broken with crxjs
|
// TEMP FIX for bug! -> this is a hack to get the injected.css file to have HMR in development mode as this import system is currently broken with crxjs
|
||||||
if (import.meta.env.MODE === 'development') {
|
if (import.meta.env.MODE === 'development') {
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ const Shortcuts = memo(() => {
|
|||||||
const [isFormVisible, setFormVisible] = useState(false);
|
const [isFormVisible, setFormVisible] = useState(false);
|
||||||
const [newURL, setNewURL] = useState<string>("");
|
const [newURL, setNewURL] = useState<string>("");
|
||||||
|
|
||||||
|
|
||||||
const switchChange = useCallback((shortcutName: string, isOn: boolean) => {
|
const switchChange = useCallback((shortcutName: string, isOn: boolean) => {
|
||||||
setSettingsState((prevState) => {
|
setSettingsState((prevState) => {
|
||||||
const updatedShortcuts = prevState.shortcuts.map((shortcut) =>
|
const updatedShortcuts = prevState.shortcuts.map((shortcut) =>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class StorageManager {
|
|||||||
return Reflect.get(target.data, prop);
|
return Reflect.get(target.data, prop);
|
||||||
},
|
},
|
||||||
set: (target, prop: keyof SettingsState, value) => {
|
set: (target, prop: keyof SettingsState, value) => {
|
||||||
Reflect.set(target.data, prop, value);
|
Reflect.set(target, prop, value);
|
||||||
target.saveToStorage();
|
target.saveToStorage();
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user