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:
parent
794c81626e
commit
55aa819077
11 changed files with 60 additions and 23 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue