1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:37:36 +00:00

IRCClient: Add a little "(n)" indicator to window list for unread messages.

This commit is contained in:
Andreas Kling 2019-03-16 02:14:53 +01:00
parent 1394677528
commit b4f787090c
9 changed files with 68 additions and 14 deletions

View file

@ -27,6 +27,13 @@ public:
void set_log_buffer(const IRCLogBuffer&);
bool is_active() const;
int unread_count() const;
void clear_unread_count();
void did_add_message();
IRCChannel& channel() { return *(IRCChannel*)m_owner; }
const IRCChannel& channel() const { return *(const IRCChannel*)m_owner; }
@ -34,6 +41,8 @@ public:
const IRCQuery& query() const { return *(const IRCQuery*)m_owner; }
private:
const char* class_name() const override { return "IRCWindow"; }
IRCClient& m_client;
void* m_owner { nullptr };
Type m_type;
@ -41,4 +50,5 @@ private:
GTableView* m_table_view { nullptr };
GTextEditor* m_text_editor { nullptr };
RetainPtr<IRCLogBuffer> m_log_buffer;
int m_unread_count { 0 };
};