hokay
This commit is contained in:
parent
12bec47ec1
commit
3257eaa9e7
|
@ -92,7 +92,7 @@ internal class Messages : IDisposable {
|
||||||
var resp = await ServerHelper.SendRequest(
|
var resp = await ServerHelper.SendRequest(
|
||||||
this.Plugin.Config.ApiKey,
|
this.Plugin.Config.ApiKey,
|
||||||
HttpMethod.Get,
|
HttpMethod.Get,
|
||||||
$"/messages/{territory}"
|
$"/messages/{territory}?filter=1"
|
||||||
);
|
);
|
||||||
var json = await resp.Content.ReadAsStringAsync();
|
var json = await resp.Content.ReadAsStringAsync();
|
||||||
var messages = JsonConvert.DeserializeObject<Message[]>(json)!;
|
var messages = JsonConvert.DeserializeObject<Message[]>(json)!;
|
||||||
|
|
|
@ -35,16 +35,18 @@ public class PluginUi : IDisposable {
|
||||||
|
|
||||||
private void DrawModals() {
|
private void DrawModals() {
|
||||||
while (this.ToShow.TryDequeue(out var toShow)) {
|
while (this.ToShow.TryDequeue(out var toShow)) {
|
||||||
ImGui.OpenPopup(toShow);
|
ImGui.OpenPopup($"{this.Plugin.Name}##{toShow}");
|
||||||
}
|
}
|
||||||
|
|
||||||
var toRemove = -1;
|
var toRemove = -1;
|
||||||
for (var i = 0; i < this.Modals.Count; i++) {
|
for (var i = 0; i < this.Modals.Count; i++) {
|
||||||
var (id, text) = this.Modals[i];
|
var (id, text) = this.Modals[i];
|
||||||
if (!ImGui.BeginPopupModal($"{this.Plugin.Name}###{id}")) {
|
if (!ImGui.BeginPopupModal($"{this.Plugin.Name}##{id}")) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui.PushID(id);
|
||||||
|
|
||||||
ImGui.TextUnformatted(text);
|
ImGui.TextUnformatted(text);
|
||||||
ImGui.Separator();
|
ImGui.Separator();
|
||||||
|
|
||||||
|
@ -54,6 +56,8 @@ public class PluginUi : IDisposable {
|
||||||
toRemove = i;
|
toRemove = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ImGui.PopID();
|
||||||
|
|
||||||
ImGui.EndPopup();
|
ImGui.EndPopup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user