basic channel mentions count indicator

This commit is contained in:
ouwou
2021-12-10 00:15:39 -05:00
parent 511fb445d1
commit 0b0135268e
9 changed files with 63 additions and 17 deletions

View File

@@ -1467,9 +1467,10 @@ void DiscordClient::HandleGatewayMessageCreate(const GatewayMessage &msg) {
if (data.GuildID.has_value())
AddUserToGuild(data.Author.ID, *data.GuildID);
m_last_message_id[data.ChannelID] = data.ID;
const auto iter = m_unread.find(data.ChannelID);
if (iter == m_unread.end())
m_unread[data.ChannelID] = 0;
m_unread[data.ChannelID];
if (data.DoesMention(GetUserData().ID)) {
m_unread[data.ChannelID]++;
}
m_signal_message_create.emit(data);
}