Skip to content

Commit

Permalink
fix: gamesetting page save/load
Browse files Browse the repository at this point in the history
  • Loading branch information
ci010 committed Aug 9, 2019
1 parent a189e42 commit 6b389cb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/renderer/windows/main/GameSettingPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,13 @@ export default {
activated() { this.load(); },
deactivated() { this.save(); },
methods: {
load() {
async load() {
await this.$repo.dispatch('loadProfileGameSettings');
const graphics = this.graphics;
const settings = this.$repo.state.profile.settings;
for (const setting of Object.keys(graphics)) {
if (typeof settings[setting] !== 'undefined') {
graphics[setting].value = settings[setting] || graphics[setting].value;
graphics[setting].value = settings[setting];
}
}
},
Expand Down

0 comments on commit 6b389cb

Please sign in to comment.