This commit is contained in:
Anna 2022-09-04 01:19:30 -04:00
parent c99bff2839
commit ec88f1d179
2 changed files with 9 additions and 0 deletions

View File

@ -107,7 +107,15 @@ internal class Messages : IDisposable {
} }
internal void Add(Message message) { internal void Add(Message message) {
this.CurrentMutex.Wait();
this.Current[message.Id] = message; this.Current[message.Id] = message;
this.CurrentMutex.Release();
this.SpawnQueue.Enqueue(message); this.SpawnQueue.Enqueue(message);
} }
internal void Remove(Guid id) {
this.CurrentMutex.Wait();
this.Current.Remove(id);
this.CurrentMutex.Release();
}
} }

View File

@ -66,6 +66,7 @@ internal class MessageList : ITab {
if (resp.IsSuccessStatusCode) { if (resp.IsSuccessStatusCode) {
this.Refresh(); this.Refresh();
this.Plugin.Vfx.RemoveStatic(id); this.Plugin.Vfx.RemoveStatic(id);
this.Plugin.Messages.Remove(id);
} }
}); });
} }