feat: add update button escape hatch

This commit is contained in:
Anna 2021-02-24 21:01:15 -05:00
parent 2b07613722
commit 04ef5e84cc

View File

@ -234,7 +234,7 @@ namespace NoSoliciting {
if (ImGui.Button("Update model")) { if (ImGui.Button("Update model")) {
// prevent issues when people spam the button // prevent issues when people spam the button
if (this.Plugin.MlStatus == MlFilterStatus.Uninitialised || this.Plugin.MlStatus == MlFilterStatus.Initialised) { if (ImGui.GetIO().KeyCtrl || this.Plugin.MlStatus == MlFilterStatus.Uninitialised || this.Plugin.MlStatus == MlFilterStatus.Initialised) {
this.Plugin.MlFilter?.Dispose(); this.Plugin.MlFilter?.Dispose();
this.Plugin.MlFilter = null; this.Plugin.MlFilter = null;
this.Plugin.MlStatus = MlFilterStatus.Uninitialised; this.Plugin.MlStatus = MlFilterStatus.Uninitialised;