dont expand channel list when changing tabs

This commit is contained in:
ouwou
2022-04-23 15:33:54 -04:00
parent b4ab88f708
commit bfb2490938
8 changed files with 16 additions and 15 deletions

View File

@@ -101,10 +101,10 @@ void MainWindow::UpdateChatWindowContents() {
m_members.UpdateMemberList();
}
void MainWindow::UpdateChatActiveChannel(Snowflake id) {
void MainWindow::UpdateChatActiveChannel(Snowflake id, bool expand_to) {
m_chat.SetActiveChannel(id);
m_members.SetActiveChannel(id);
m_channel_list.SetActiveChannel(id);
m_channel_list.SetActiveChannel(id, expand_to);
m_content_stack.set_visible_child("chat");
}
@@ -281,7 +281,7 @@ void MainWindow::SetupMenu() {
});
m_menu_view_friends.signal_activate().connect([this] {
UpdateChatActiveChannel(Snowflake::Invalid);
UpdateChatActiveChannel(Snowflake::Invalid, true);
m_members.UpdateMemberList();
m_content_stack.set_visible_child("friends");
});

View File

@@ -13,7 +13,7 @@ public:
void UpdateMembers();
void UpdateChannelListing();
void UpdateChatWindowContents();
void UpdateChatActiveChannel(Snowflake id);
void UpdateChatActiveChannel(Snowflake id, bool expand_to);
Snowflake GetChatActiveChannel() const;
void UpdateChatNewMessage(const Message &data);
void UpdateChatMessageDeleted(Snowflake id, Snowflake channel_id);