fix: don't calculate in task
This commit is contained in:
parent
2bedf0e9bb
commit
e0ba98853f
|
@ -69,13 +69,7 @@ namespace NoSoliciting {
|
||||||
}
|
}
|
||||||
|
|
||||||
// pre-compute the max ilvl to prevent stutter
|
// pre-compute the max ilvl to prevent stutter
|
||||||
Task.Run(async () => {
|
FilterUtil.MaxItemLevelAttainable(this.Interface.Data);
|
||||||
while (!this.Interface.Data.IsDataReady) {
|
|
||||||
await Task.Delay(1_000).ConfigureAwait(true);
|
|
||||||
}
|
|
||||||
|
|
||||||
FilterUtil.MaxItemLevelAttainable(this.Interface.Data);
|
|
||||||
});
|
|
||||||
|
|
||||||
this.Interface.Framework.Gui.Chat.OnCheckMessageHandled += this.Filter.OnChat;
|
this.Interface.Framework.Gui.Chat.OnCheckMessageHandled += this.Filter.OnChat;
|
||||||
this.Interface.UiBuilder.OnBuildUi += this.Ui.Draw;
|
this.Interface.UiBuilder.OnBuildUi += this.Ui.Draw;
|
||||||
|
@ -90,7 +84,7 @@ namespace NoSoliciting {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Task.Run(async () => { this.MlFilter = await MlFilter.Load(this); })
|
Task.Run(async () => this.MlFilter = await MlFilter.Load(this))
|
||||||
.ContinueWith(e => {
|
.ContinueWith(e => {
|
||||||
if (!e.IsFaulted) {
|
if (!e.IsFaulted) {
|
||||||
PluginLog.Log("Machine learning model loaded");
|
PluginLog.Log("Machine learning model loaded");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user