Fix not being able to set `AvailableMods` before loaded

This commit is contained in:
Bartłomiej Dach 2022-05-11 20:23:56 +02:00
parent 7ac6073f13
commit 52bbce12f1
No known key found for this signature in database
GPG Key ID: BCECCD4FA41F6497
1 changed files with 4 additions and 1 deletions

View File

@ -49,6 +49,8 @@ public IReadOnlyList<ModState> AvailableMods
Debug.Assert(value.All(mod => mod.Mod.Type == ModType)); Debug.Assert(value.All(mod => mod.Mod.Type == ModType));
availableMods = value; availableMods = value;
if (IsLoaded)
asyncLoadPanels(); asyncLoadPanels();
} }
} }
@ -249,6 +251,7 @@ protected override void LoadComplete()
base.LoadComplete(); base.LoadComplete();
toggleAllCheckbox?.Current.BindValueChanged(_ => updateToggleAllText(), true); toggleAllCheckbox?.Current.BindValueChanged(_ => updateToggleAllText(), true);
asyncLoadPanels();
} }
private void updateToggleAllText() private void updateToggleAllText()