diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-02-03 22:12:35 -0500 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2021-02-03 22:12:35 -0500 |
commit | 0479bf52c2417cd983d808b6bce3f48f1551d6d9 (patch) | |
tree | 4a9f5d9def68680cc528c7d455fc118f0f90c03e /windows | |
parent | c8df5dedd3ff4fcd278287a9354ba1952aa170d0 (diff) | |
download | abaddon-portaudio-0479bf52c2417cd983d808b6bce3f48f1551d6d9.tar.gz abaddon-portaudio-0479bf52c2417cd983d808b6bce3f48f1551d6d9.zip |
show MESSAGE_BULK_DELETE in audit log and show items with no extra markup as expanded
Diffstat (limited to 'windows')
-rw-r--r-- | windows/guildsettings/auditlogpane.cpp | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/windows/guildsettings/auditlogpane.cpp b/windows/guildsettings/auditlogpane.cpp index 5776e27..7f789e7 100644 --- a/windows/guildsettings/auditlogpane.cpp +++ b/windows/guildsettings/auditlogpane.cpp @@ -421,6 +421,22 @@ void GuildSettingsAuditLogPane::OnAuditLogFetch(const AuditLogData &data) { "deleted <b>" + count + "</b> messages"; } } break; + case AuditLogActionType::MESSAGE_BULK_DELETE: { + const auto channel = discord.GetChannel(entry.TargetID); + if (channel.has_value()) { + markup = "<b>" + user.GetEscapedString() + "</b> " + + "deleted <b>" + + *entry.Options->Count + + "</b> messages in <b>#" + + Glib::Markup::escape_text(*channel->Name) + + "</b>"; + } else { + markup = "<b>" + user.GetEscapedString() + "</b> " + + "deleted <b>" + + *entry.Options->Count + + "</b> messages"; + } + } break; case AuditLogActionType::MESSAGE_PIN: { const auto target_user = discord.GetUser(entry.TargetID); markup = "<b>" + user.GetEscapedString() + "</b> " + @@ -449,7 +465,7 @@ void GuildSettingsAuditLogPane::OnAuditLogFetch(const AuditLogData &data) { "</b>"); } - if (extra_markup.size() == 1) + if (extra_markup.size() <= 1) expander->set_expanded(true); auto contents = Gtk::manage(new Gtk::Box(Gtk::ORIENTATION_VERTICAL)); |