mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-27 16:16:35 +03:00
update channel list selection when channel mention is clicked
This commit is contained in:
@@ -414,6 +414,12 @@ void ChannelList::Clear() {
|
||||
m_update_dispatcher.emit();
|
||||
}
|
||||
|
||||
void ChannelList::SetActiveChannel(Snowflake id) {
|
||||
auto it = m_id_to_row.find(id);
|
||||
if (it == m_id_to_row.end()) return;
|
||||
m_list->select_row(*it->second);
|
||||
}
|
||||
|
||||
void ChannelList::CollapseRow(ChannelListRow *row) {
|
||||
row->Collapse();
|
||||
for (auto child : row->Children) {
|
||||
|
||||
@@ -94,6 +94,8 @@ public:
|
||||
void UpdateGuild(Snowflake id);
|
||||
void Clear();
|
||||
|
||||
void SetActiveChannel(Snowflake id);
|
||||
|
||||
protected:
|
||||
Gtk::ListBox *m_list;
|
||||
Gtk::ScrolledWindow *m_main;
|
||||
|
||||
Reference in New Issue
Block a user