Skip to content

Commit

Permalink
Attempt to prevent cases where the config is has changed but changes …
Browse files Browse the repository at this point in the history
…haven't synced to the browser yet
  • Loading branch information
inkfarer committed Apr 7, 2024
1 parent 33fd901 commit 867c4fa
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/store/configStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,15 @@ export const useConfigStore = defineStore('config', () => {
}

async function patch(values: Partial<Configuration>) {
const newConfig = {
...userConfig.value,
...values
}

return invoke('update_config', {
config: {
...userConfig.value,
...values
}
config: newConfig
}).then(() => {
userConfig.value = newConfig
})
}

Expand Down

0 comments on commit 867c4fa

Please sign in to comment.