mirror of
https://github.com/celisej567/abaddon.git
synced 2026-09-06 20:15:19 +03:00
disconnecting clears the channel listing
This commit is contained in:
@@ -31,6 +31,12 @@ void ChannelList::SetListingFromGuilds(const DiscordClient::Guilds_t &guilds) {
|
||||
m_update_dispatcher.emit();
|
||||
}
|
||||
|
||||
void ChannelList::ClearListing() {
|
||||
std::scoped_lock<std::mutex> guard(m_update_mutex);
|
||||
m_update_queue.push(DiscordClient::Guilds_t());
|
||||
m_update_dispatcher.emit();
|
||||
}
|
||||
|
||||
void ChannelList::on_row_activated(Gtk::ListBoxRow *row) {
|
||||
auto &info = m_infos[row];
|
||||
bool new_collapsed = !info.IsUserCollapsed;
|
||||
@@ -77,6 +83,12 @@ void ChannelList::SetListingFromGuildsInternal() {
|
||||
it++;
|
||||
}
|
||||
|
||||
if (guilds->empty()) {
|
||||
std::scoped_lock<std::mutex> guard(m_update_mutex);
|
||||
m_update_queue.pop();
|
||||
return;
|
||||
}
|
||||
|
||||
auto &settings = m_abaddon->GetDiscordClient().GetUserSettings();
|
||||
|
||||
std::vector<std::pair<Snowflake, GuildData>> sorted_guilds;
|
||||
|
||||
Reference in New Issue
Block a user