This commit is contained in:
Anna 2022-09-05 04:40:28 -04:00
parent 12bec47ec1
commit 3257eaa9e7
2 changed files with 7 additions and 3 deletions

View File

@ -92,7 +92,7 @@ internal class Messages : IDisposable {
var resp = await ServerHelper.SendRequest(
this.Plugin.Config.ApiKey,
HttpMethod.Get,
$"/messages/{territory}"
$"/messages/{territory}?filter=1"
);
var json = await resp.Content.ReadAsStringAsync();
var messages = JsonConvert.DeserializeObject<Message[]>(json)!;

View File

@ -35,16 +35,18 @@ public class PluginUi : IDisposable {
private void DrawModals() {
while (this.ToShow.TryDequeue(out var toShow)) {
ImGui.OpenPopup(toShow);
ImGui.OpenPopup($"{this.Plugin.Name}##{toShow}");
}
var toRemove = -1;
for (var i = 0; i < this.Modals.Count; i++) {
var (id, text) = this.Modals[i];
if (!ImGui.BeginPopupModal($"{this.Plugin.Name}###{id}")) {
if (!ImGui.BeginPopupModal($"{this.Plugin.Name}##{id}")) {
continue;
}
ImGui.PushID(id);
ImGui.TextUnformatted(text);
ImGui.Separator();
@ -54,6 +56,8 @@ public class PluginUi : IDisposable {
toRemove = i;
}
ImGui.PopID();
ImGui.EndPopup();
}