1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:38:11 +00:00

IRCClient: Colorize some channel messages (joins, parts, topics)

This commit is contained in:
Andreas Kling 2019-03-18 20:56:45 +01:00
parent 794c81626e
commit 55aa819077
11 changed files with 60 additions and 23 deletions

View file

@ -1,6 +1,7 @@
#include "IRCWindowListModel.h"
#include "IRCWindow.h"
#include "IRCClient.h"
#include "IRCChannel.h"
#include <stdio.h>
#include <time.h>
@ -58,6 +59,8 @@ GVariant IRCWindowListModel::data(const GModelIndex& index, Role role) const
auto& window = m_client.window_at(index.row());
if (window.unread_count())
return Color(Color::Red);
if (!window.channel().is_open())
return Color(Color::LightGray);
return Color(Color::Black);
}
}