some better member/role update handling

This commit is contained in:
ouwou
2021-01-18 01:34:47 -05:00
parent 4fd7f9d75e
commit 42252aa6aa
5 changed files with 25 additions and 11 deletions

View File

@@ -1071,6 +1071,11 @@ ChatMessageHeader::ChatMessageHeader(const Message *data) {
show_all();
auto &discord = Abaddon::Get().GetDiscordClient();
auto role_update_cb = [this](const auto &) { UpdateNameColor(); };
discord.signal_role_update().connect(sigc::track_obj(role_update_cb, *this));
auto guild_member_update_cb = [this](const auto &, const auto &) { UpdateNameColor(); };
discord.signal_guild_member_update().connect(sigc::track_obj(guild_member_update_cb, *this));
UpdateNameColor();
AttachUserMenuHandler(*m_meta_ev);
AttachUserMenuHandler(*m_avatar_ev);