diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2024-01-08 03:09:30 -0500 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2024-01-08 03:09:30 -0500 |
commit | b700aa85d82b0af391e9fef84202488a779bc304 (patch) | |
tree | 7910dd798d32c1d1fb33e60ab83ffd4a0463dd8f | |
parent | 6f8417525883acfb77af856f44aee26c1477ca91 (diff) | |
download | abaddon-portaudio-b700aa85d82b0af391e9fef84202488a779bc304.tar.gz abaddon-portaudio-b700aa85d82b0af391e9fef84202488a779bc304.zip |
explicitly expand guild row when switching to it in classic view
-rw-r--r-- | src/components/channellist/channellisttree.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/components/channellist/channellisttree.cpp b/src/components/channellist/channellisttree.cpp index b66beb0..6741a69 100644 --- a/src/components/channellist/channellisttree.cpp +++ b/src/components/channellist/channellisttree.cpp @@ -310,6 +310,12 @@ void ChannelListTree::SetClassic(bool value) { void ChannelListTree::SetSelectedGuild(Snowflake guild_id) { m_classic_selected_guild = guild_id; m_filter_model->refilter(); + auto guild_iter = GetIteratorForGuildFromID(guild_id); + if (guild_iter) { + if (auto filter_iter = m_filter_model->convert_child_iter_to_iter(guild_iter)) { + m_view.expand_row(m_filter_model->get_path(filter_iter), false); + } + } } void ChannelListTree::OnPanedPositionChanged() { |