Skip to content

Commit

Permalink
Flush local mod list before moving to profile
Browse files Browse the repository at this point in the history
LocalModList is rendered before transition to the view actually takes
place. If user has previously viewed a large profile, it's still stored
in VueX and this unnecessary step can take several seconds. Resetting
the stored mod list prevents this unnecessary wait.

Ideally this would be done when the mod list component unmounts, but
that would mess with the NavigationBar which shows the number of
installed mods.
  • Loading branch information
anttimaki committed Jan 23, 2024
1 parent 3ad7761 commit 1436f39
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/pages/Profiles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -429,9 +429,10 @@ export default class Profiles extends Vue {
return sanitize(nameToSanitize);
}
setProfileAndContinue() {
settings.setProfile(Profile.getActiveProfile().getProfileName());
this.$router.push({name: 'manager.installed'});
async setProfileAndContinue() {
await this.$store.dispatch('updateModList', []);
await settings.setProfile(Profile.getActiveProfile().getProfileName());
await this.$router.push({name: 'manager.installed'});
}
downloadImportedProfileMods(modList: ExportMod[], callback?: () => void) {
Expand Down

0 comments on commit 1436f39

Please sign in to comment.