From 71c52373f81cace664047edd19d9d289f45a4dff Mon Sep 17 00:00:00 2001 From: Ricardo Cino Date: Thu, 7 Jul 2022 09:31:50 +0200 Subject: chore: Mobx & React-Router upgrade (#406) Co-authored-by: Vijay A --- src/stores/SettingsStore.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/stores/SettingsStore.ts') diff --git a/src/stores/SettingsStore.ts b/src/stores/SettingsStore.ts index 0296ba0e7..a03d3c188 100644 --- a/src/stores/SettingsStore.ts +++ b/src/stores/SettingsStore.ts @@ -1,6 +1,7 @@ + import { ipcRenderer } from 'electron'; import { getCurrentWindow } from '@electron/remote'; -import { action, computed, observable, reaction } from 'mobx'; +import { action, computed, makeObservable, observable, reaction } from 'mobx'; import localStorage from 'mobx-localstorage'; import { Stores } from '../@types/stores.types'; import { ApiInterface } from '../api'; @@ -22,7 +23,7 @@ export default class SettingsStore extends TypedStore { 'updateAppSettings', ); - loaded = false; + @observable loaded: boolean = false; fileSystemSettingsTypes = FILE_SYSTEM_SETTINGS_TYPES; @@ -34,6 +35,8 @@ export default class SettingsStore extends TypedStore { constructor(stores: Stores, api: ApiInterface, actions: Actions) { super(stores, api, actions); + makeObservable(this); + // Register action handlers this.actions.settings.update.listen(this._update.bind(this)); this.actions.settings.remove.listen(this._remove.bind(this)); -- cgit v1.2.3-70-g09d2