Skip to content

Commit 4a0426b

Browse files
Keep mods list updated with the view
1 parent cc57c06 commit 4a0426b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Source/HedgeModManager.UI/ViewModels/MainWindowViewModel.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,8 @@ public async Task SaveAsync(bool setBusy = true)
455455

456456
// Ensure enabled mods are on top of disabled mods
457457
// TODO: Find a method to reorder without full update
458-
Mods = new (SelectedGame.Game.ModDatabase.Mods.OrderBy(x => !x.Enabled));
458+
if (SelectedGame.Game.ModDatabase is ModDatabaseGeneric modsDB)
459+
Mods = new(modsDB.Mods = new(modsDB.Mods.OrderBy(x => !x.Enabled)));
459460

460461
await SelectedGame.Game.ModDatabase.Save();
461462
if (SelectedGame.Game.ModLoaderConfiguration is ModLoaderConfiguration config)

0 commit comments

Comments
 (0)