From eab0e100c4368b3a9b42c0f8cc0f6cc4faf0f1bc Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Fri, 25 Jun 2021 22:54:34 -0400 Subject: be more consistent with callbacks --- windows/guildsettings/emojispane.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'windows/guildsettings/emojispane.cpp') diff --git a/windows/guildsettings/emojispane.cpp b/windows/guildsettings/emojispane.cpp index 7a88938..94a4d0a 100644 --- a/windows/guildsettings/emojispane.cpp +++ b/windows/guildsettings/emojispane.cpp @@ -176,8 +176,8 @@ void GuildSettingsEmojisPane::OnFetchEmojis(std::vector emojis) { } void GuildSettingsEmojisPane::OnEditName(Snowflake id, const std::string &name) { - const auto cb = [this](bool success) { - if (!success) { + const auto cb = [this](DiscordError code) { + if (code != DiscordError::NONE) { Gtk::MessageDialog dlg("Failed to set emoji name", false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK); dlg.set_position(Gtk::WIN_POS_CENTER); dlg.run(); @@ -199,8 +199,8 @@ void GuildSettingsEmojisPane::OnMenuDelete() { const auto id = static_cast(selected_row[m_columns.m_col_id]); if (auto *window = dynamic_cast(get_toplevel())) if (Abaddon::Get().ShowConfirm("Are you sure you want to delete " + name + "?", window)) { - const auto cb = [this](bool success) { - if (!success) { + const auto cb = [this](DiscordError code) { + if (code != DiscordError::NONE) { Gtk::MessageDialog dlg("Failed to delete emoji", false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK); dlg.set_position(Gtk::WIN_POS_CENTER); dlg.run(); -- cgit v1.2.3