update channel list selection when channel mention is clicked

This commit is contained in:
ouwou
2020-11-01 00:13:52 -04:00
parent 90ea3c55cc
commit ec8117a24b
5 changed files with 13 additions and 4 deletions

View File

@@ -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) {