forked from OpenGamers/abaddon
set main window to invalid channel when looking at friends
This commit is contained in:
parent
a283ab14a2
commit
6a15f91a14
@ -31,9 +31,9 @@ RateLimitIndicator::RateLimitIndicator()
|
||||
|
||||
void RateLimitIndicator::SetActiveChannel(Snowflake id) {
|
||||
m_active_channel = id;
|
||||
const auto channel = *Abaddon::Get().GetDiscordClient().GetChannel(m_active_channel);
|
||||
if (channel.RateLimitPerUser.has_value())
|
||||
m_rate_limit = *channel.RateLimitPerUser;
|
||||
const auto channel = Abaddon::Get().GetDiscordClient().GetChannel(m_active_channel);
|
||||
if (channel.has_value() && channel->RateLimitPerUser.has_value())
|
||||
m_rate_limit = *channel->RateLimitPerUser;
|
||||
else
|
||||
m_rate_limit = 0;
|
||||
|
||||
|
@ -87,6 +87,8 @@ MainWindow::MainWindow()
|
||||
});
|
||||
|
||||
m_menu_view_friends.signal_activate().connect([this] {
|
||||
UpdateChatActiveChannel(Snowflake::Invalid);
|
||||
m_members.UpdateMemberList();
|
||||
m_content_stack.set_visible_child("friends");
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user