diff options
author | lonkaars <loek@pipeframe.xyz> | 2022-06-05 17:01:36 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2022-06-05 17:01:36 +0200 |
commit | 6e514e71fe7cce7a6156747b5d3d852355365891 (patch) | |
tree | 416c32d643ab3fed01bdf57482249568482c8f22 | |
parent | c4f82cfa5fa17f76547a0502961b433a1eb19aef (diff) |
don't show ping when disconnected0.3.0
-rw-r--r-- | client/ui.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/client/ui.c b/client/ui.c index 1cde52f..f636501 100644 --- a/client/ui.c +++ b/client/ui.c @@ -41,9 +41,9 @@ void w2_ui_paint_statusbar() { mvaddnstr(1, 0, temp, g_w2_ui_width); mvaddnstr(2, 0, temp, g_w2_ui_width); - sprintf(temp, "%s, %ims %s", - g_w2_state.connected ? W2_UI_CONN_STAT_CONNECTED : W2_UI_CONN_STAT_DISCONNECTED, - g_w2_state.ping, W2_UI_CONN_STAT_PING); + g_w2_state.connected + ? sprintf(temp, W2_UI_CONN_STAT_CONNECTED ", %ims %s", g_w2_state.ping, W2_UI_CONN_STAT_PING) + : sprintf(temp, W2_UI_CONN_STAT_DISCONNECTED); mvaddstr(0, 0, temp); sprintf(temp, "(%s)", g_w2_state.info.build_str); |