Reload user settings when changed externally (#4097)

* Reload user settings when changed externally

* Fix to not use any

* Make sure listener doesn't already exist

* Fix up projects reloading

---------

Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
This commit is contained in:
49fl
2024-10-07 23:07:18 -04:00
committed by GitHub
parent 7de0b74c16
commit 24cd1b2ea5
11 changed files with 151 additions and 79 deletions

View File

@ -19,7 +19,7 @@ export const settingsMachine = setup({
types: {
context: {} as ReturnType<typeof createSettings>,
input: {} as ReturnType<typeof createSettings>,
events: {} as
events: {} as (
| WildcardSetEvent<SettingsPaths>
| SetEventTypes
| {
@ -34,7 +34,8 @@ export const settingsMachine = setup({
type: 'Reset settings'
level: SettingsLevel
}
| { type: 'Set all settings'; settings: typeof settings },
| { type: 'Set all settings'; settings: typeof settings }
) & { doNotPersist?: boolean },
},
actions: {
setEngineTheme: () => {},