mirror of
https://github.com/uowuo/abaddon.git
synced 2026-08-15 05:19:58 +00:00
fix handling of reconnect messages
This commit is contained in:
12
abaddon.cpp
12
abaddon.cpp
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user