mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-13 20:18:50 +03:00
mark channels as unread on MESSAGE_CREATE
This commit is contained in:
@@ -699,10 +699,11 @@ void ChannelList::OnMessageAck(const MessageAckData &data) {
|
||||
}
|
||||
|
||||
void ChannelList::OnMessageCreate(const Message &msg) {
|
||||
auto iter = GetIteratorForChannelFromID(msg.ChannelID);
|
||||
m_model->row_changed(m_model->get_path(iter), iter); // redraw
|
||||
const auto channel = Abaddon::Get().GetDiscordClient().GetChannel(msg.ChannelID);
|
||||
if (!channel.has_value()) return;
|
||||
if (channel->Type != ChannelType::DM && channel->Type != ChannelType::GROUP_DM) return;
|
||||
auto iter = GetIteratorForChannelFromID(msg.ChannelID);
|
||||
if (iter)
|
||||
(*iter)[m_columns.m_sort] = -msg.ID;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user