diff options
Diffstat (limited to 'src/components/channellist')
-rw-r--r-- | src/components/channellist/channellist.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/components/channellist/channellist.cpp b/src/components/channellist/channellist.cpp index e4060a8..873de41 100644 --- a/src/components/channellist/channellist.cpp +++ b/src/components/channellist/channellist.cpp @@ -28,6 +28,14 @@ void ChannelList::UpdateListing() { } void ChannelList::SetActiveChannel(Snowflake id, bool expand_to) { + if (Abaddon::Get().GetSettings().ClassicChangeGuildOnOpen) { + if (const auto channel = Abaddon::Get().GetDiscordClient().GetChannel(id); channel.has_value() && channel->GuildID.has_value()) { + m_tree.SetSelectedGuild(*channel->GuildID); + } else { + m_tree.SetSelectedDMs(); + } + } + m_tree.SetActiveChannel(id, expand_to); } |