From 1436f3986b3f8ebb7efe07eee85977ff70f335a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20M=C3=A4ki?= Date: Tue, 23 Jan 2024 12:53:02 +0200 Subject: [PATCH] Flush local mod list before moving to profile 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. --- src/pages/Profiles.vue | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pages/Profiles.vue b/src/pages/Profiles.vue index 2830e5e9c..364256b41 100644 --- a/src/pages/Profiles.vue +++ b/src/pages/Profiles.vue @@ -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) {