fix handling of reconnect messages

This commit is contained in:
ouwou
2021-04-15 02:32:47 -04:00
parent 3c7c40edcd
commit 0aaebf9ea7
4 changed files with 17 additions and 16 deletions

View File

@@ -235,13 +235,13 @@ void Abaddon::DiscordOnMessageSent(const Message &data) {
}
void Abaddon::DiscordOnDisconnect(bool is_reconnecting, GatewayCloseCode close_code) {
if (!is_reconnecting) {
m_channels_history_loaded.clear();
m_channels_history_loading.clear();
m_channels_requested.clear();
m_main_window->set_title(APP_TITLE);
}
m_channels_history_loaded.clear();
m_channels_history_loading.clear();
m_channels_requested.clear();
if (is_reconnecting) return;
m_main_window->set_title(APP_TITLE);
m_main_window->UpdateComponents();
if (close_code == GatewayCloseCode::AuthenticationFailed) {
Gtk::MessageDialog dlg(*m_main_window, "Discord rejected your token", false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true);
dlg.set_position(Gtk::WIN_POS_CENTER);