Skip to content

Commit fa4fc02

Browse files
committed
- Remove empty modpacks when cleaning up the modlist.
1 parent 23b7588 commit fa4fc02

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

xivModdingFramework/Mods/Modding.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -732,6 +732,13 @@ public async Task CleanUpModlist(IProgress<(int Current, int Total, string Messa
732732
modlist.Mods.Remove(mod);
733733
}
734734

735+
progressReporter?.Report((0, 0, "Removing empty modpacks..."));
736+
737+
modlist.ModPacks.RemoveAll(modpack => {
738+
var anyMods = modlist.Mods.Any(mod => mod.modPack != null && mod.modPack.name == modpack.name);
739+
return !anyMods;
740+
});
741+
735742
progressReporter?.Report((0, 0, "Saving Modlist file..."));
736743

737744
await SaveModListAsync(modlist);

0 commit comments

Comments
 (0)