fix: end tab bar in reporting window

This commit is contained in:
Anna 2020-09-05 22:32:07 -04:00
parent 639c48ff61
commit 3fa636d110
Signed by: anna
GPG Key ID: 0B391D8F06FCD9E0

View File

@ -294,7 +294,8 @@ namespace NoSoliciting {
string sender = message.Sender.Payloads
.Where(payload => payload.Type == PayloadType.RawText)
.Select(payload => (payload as TextPayload).Text)
.Cast<TextPayload>()
.Select(payload => payload.Text)
.FirstOrDefault() ?? "";
if (AddColumn(maxSizes, message.Timestamp.ToString(CultureInfo.CurrentCulture), message.ChatType.ToString(), message.FilterReason ?? "", sender, message.Content.TextValue)) {
@ -357,6 +358,8 @@ namespace NoSoliciting {
}
ImGui.EndTabItem();
}
ImGui.EndTabBar();
}
ImGui.End();
@ -364,7 +367,10 @@ namespace NoSoliciting {
private void SetUpReportModal(Message message) {
ImGui.SetNextWindowSize(new Vector2(350, -1));
if (ImGui.BeginPopupModal($"Report to NoSoliciting###modal-message-{message.Id}")) {
if (!ImGui.BeginPopupModal($"Report to NoSoliciting###modal-message-{message.Id}")) {
return;
}
ImGui.PushTextWrapPos();
ImGui.Text("Reporting this message will let the developer know that you think this message was incorrectly classified.");
@ -412,7 +418,6 @@ namespace NoSoliciting {
ImGui.EndPopup();
}
}
private enum ReportStatus {
None = -1,