From 12741098da937ab55d2e1292631217b3a21a3ffa Mon Sep 17 00:00:00 2001 From: GeckoEidechse <40122905+GeckoEidechse@users.noreply.github.com> Date: Mon, 27 Mar 2023 17:58:26 +0200 Subject: fix: Address regression around persistent store (#227) * fix: Pin tauri-plugin-store package to same commit Pin npm package to same commit as Rust crate * fix: Attempt using newest plugin store commit * fix: Perform explicit save to store on each change This seems to resolve the issue around no longer writing changes to store on close as now values are written on each change. * chore: Pin dependencies to specific commit Instead of tracking a branch, track a specific commit --- src-vue/src/plugins/store.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src-vue/src/plugins') diff --git a/src-vue/src/plugins/store.ts b/src-vue/src/plugins/store.ts index d5b7c5d8..caa46bee 100644 --- a/src-vue/src/plugins/store.ts +++ b/src-vue/src/plugins/store.ts @@ -143,6 +143,7 @@ export const store = createStore({ // Save change in persistent store await persistentStore.set('game-install', { value: game_install }); + await persistentStore.save(); // explicit save to disk // Check for Northstar install store.commit('checkNorthstarUpdates'); @@ -307,6 +308,7 @@ export const store = createStore({ // Save change in persistent store await persistentStore.set('northstar-release-canal', { value: state.northstar_release_canal }); + await persistentStore.save(); // explicit save to disk // Update current state so that update check etc can be performed store.commit("checkNorthstarUpdates"); @@ -407,6 +409,7 @@ async function _initializeApp(state: any) { // Save change in persistent store await persistentStore.set('game-install', { value: typedResult }); + await persistentStore.save(); // explicit save to disk // Update UI store state.game_path = typedResult.game_path; -- cgit v1.2.3