diff --git a/src/components/views/InstalledModView.vue b/src/components/views/InstalledModView.vue index 29131de5d..cc7b78c60 100644 --- a/src/components/views/InstalledModView.vue +++ b/src/components/views/InstalledModView.vue @@ -24,7 +24,7 @@ You have {{ numberOfModsWithUpdates }} available mod update{{ numberOfModsWithUpdates > 1 ? "s" : ""}}. Would you like to update all? - + @@ -50,7 +50,7 @@ import LocalModListProvider from "../../providers/components/loaders/LocalModLis export default class InstalledModView extends Vue { get dismissedUpdateAll() { - return this.$store.state.dismissedUpdateAll; + return this.$store.state.profile.dismissedUpdateAll; } get localModList(): ManifestV2[] { diff --git a/src/store/index.ts b/src/store/index.ts index 826017f02..808ccccf3 100644 --- a/src/store/index.ts +++ b/src/store/index.ts @@ -16,7 +16,6 @@ Vue.use(Vuex); export interface State { activeGame: Game; - dismissedUpdateAll: boolean; isMigrationChecked: boolean; _settings: ManagerSettings | null; } @@ -31,16 +30,12 @@ type Context = ActionContext; export const store = { state: { activeGame: GameManager.defaultGame, - dismissedUpdateAll: false, isMigrationChecked: false, // Access through getters to ensure the settings are loaded. _settings: null, }, actions: { - dismissUpdateAll({commit}: Context) { - commit('dismissUpdateAll'); - }, async checkMigrations({commit, state}: Context) { if (state.isMigrationChecked) { return; @@ -63,9 +58,6 @@ export const store = { setActiveGame(state: State, game: Game) { state.activeGame = game; }, - dismissUpdateAll(state: State) { - state.dismissedUpdateAll = true; - }, setMigrationChecked(state: State) { state.isMigrationChecked = true; }, diff --git a/src/store/modules/ProfileModule.ts b/src/store/modules/ProfileModule.ts index 445c25355..e5a41544f 100644 --- a/src/store/modules/ProfileModule.ts +++ b/src/store/modules/ProfileModule.ts @@ -22,6 +22,7 @@ interface State { direction?: SortDirection; disabledPosition?: SortLocalDisabledMods; searchQuery: string; + dismissedUpdateAll: boolean; } /** @@ -37,6 +38,7 @@ export default { direction: undefined, disabledPosition: undefined, searchQuery: '', + dismissedUpdateAll: false, }), getters: >{ @@ -105,6 +107,10 @@ export default { state.activeProfile = profile; }, + dismissUpdateAll(state: State) { + state.dismissedUpdateAll = true; + }, + // Avoid calling this directly, prefer updateModList action to // ensure TSMM specific code gets called. setModList(state: State, list: ManifestV2[]) {