mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
prevent some collection is modified errors
This commit is contained in:
parent
4328826c86
commit
b0906af1ba
1 changed files with 7 additions and 2 deletions
|
|
@ -206,7 +206,10 @@ internal class ProfileManagerWidget
|
||||||
{
|
{
|
||||||
if (ImGui.Button("Do it") && selected != null)
|
if (ImGui.Button("Do it") && selected != null)
|
||||||
{
|
{
|
||||||
Task.Run(() => profile.AddOrUpdate(selected.Manifest.InternalName, selected.IsLoaded));
|
// TODO: handle error
|
||||||
|
profile.AddOrUpdate(selected.Manifest.InternalName, selected.IsLoaded, false);
|
||||||
|
Task.Run(() => profman.ApplyAllWantStates())
|
||||||
|
.ContinueWith(this.installer.DisplayErrorContinuation, "Could not change plugin state.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -382,7 +385,9 @@ internal class ProfileManagerWidget
|
||||||
|
|
||||||
if (wantRemovePluginInternalName != null)
|
if (wantRemovePluginInternalName != null)
|
||||||
{
|
{
|
||||||
Task.Run(() => profile.Remove(wantRemovePluginInternalName))
|
// TODO: handle error
|
||||||
|
profile.Remove(wantRemovePluginInternalName, false);
|
||||||
|
Task.Run(() => profman.ApplyAllWantStates())
|
||||||
.ContinueWith(this.installer.DisplayErrorContinuation, "Could not remove plugin.");
|
.ContinueWith(this.installer.DisplayErrorContinuation, "Could not remove plugin.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue