mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-25 05:53:01 +01:00
Show connection status in groupchat peerlist
This commit is contained in:
parent
8d125d5e6b
commit
3f3e848b6f
@ -1679,7 +1679,15 @@ static void groupchat_onDraw(ToxWindow *self, Tox *m)
|
||||
wattron(ctx->sidebar, A_BOLD);
|
||||
|
||||
pthread_mutex_lock(&Winthread.lock);
|
||||
wprintw(ctx->sidebar, "Peers: %d\n", chat->num_peers);
|
||||
|
||||
if (chat->num_peers > 1) {
|
||||
wprintw(ctx->sidebar, "Peers: %d\n", chat->num_peers);
|
||||
} else if (tox_group_is_connected(m, self->num, NULL)) {
|
||||
wprintw(ctx->sidebar, "Connecting...\n");
|
||||
} else {
|
||||
wprintw(ctx->sidebar, "Disconnected\n");
|
||||
}
|
||||
|
||||
pthread_mutex_unlock(&Winthread.lock);
|
||||
|
||||
wattroff(ctx->sidebar, A_BOLD);
|
||||
|
Loading…
Reference in New Issue
Block a user