Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reload profile mod list when uninstalling a mod as an installation step #1663

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

VilppeRiskidev
Copy link
Collaborator

No description provided.

Verified

This commit was signed with the committer’s verified signature.
jameslamb James Lamb
@VilppeRiskidev VilppeRiskidev self-assigned this Mar 11, 2025
@@ -85,7 +85,8 @@ export default class DownloadMixin extends Vue {
assignId: number
): Promise<void> {
await ProfileModList.requestLock(async () => {
const modList: ManifestV2[] = await installModsToProfile(downloadedMods, profile, undefined,(status, modName, installProgress) => {
const reloadModList = () => this.$store.dispatch('profile/tryLoadModListFromDisk');
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could use updateModList instead of tryLoadModListFromDisk, but that would then require passing the mod list from ProfileUtils' installModsToProfile.
I thought this way would be better as the thing was to make the list match what's on the disk to begin with.

@@ -92,6 +93,9 @@ export async function installModsToProfile(

// Uninstall possible different version of the mod before installing the target version.
throwForR2Error(await ProfileInstallerProvider.instance.uninstallMod(manifestMod, profile));
throwForR2Error(await ProfileModList.removeMod(manifestMod, profile));
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could be called somewhere else, either in DownloadMixin/ImportProfileModal or deeper inside the ProfileInstallerProvider.instance.uninstallMod, but this seemed like the place that most directly represents the actual order of operations

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant