1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-04 19:46:44 +02:00

better way to check connection status

This commit is contained in:
Jfreegman
2013-09-06 21:37:16 -04:00
parent 261310b091
commit 9bf9dbe875
2 changed files with 10 additions and 1 deletions

View File

@ -238,9 +238,11 @@ static void do_tox(Tox *m, ToxWindow *prompt)
}
} else if (!dht_on && tox_isconnected(m)) {
dht_on = true;
prompt_update_connectionstatus(prompt, dht_on);
wprintw(prompt->window, "\nDHT connected.\n");
} else if (dht_on && !tox_isconnected(m)) {
dht_on = false;
prompt_update_connectionstatus(prompt, dht_on);
wprintw(prompt->window, "\nDHT disconnected. Attempting to reconnect.\n");
}