From 21edd2d823080771eff13c885f6e1d71d6cfbbe2 Mon Sep 17 00:00:00 2001 From: Sebastian Mark Date: Wed, 13 Nov 2024 17:17:39 +0100 Subject: [PATCH] feat: better error display in TUI - always show `client.LasErr` if not `nil` --- cmd/client/view.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/client/view.go b/cmd/client/view.go index 884ea00..0e7d9b9 100644 --- a/cmd/client/view.go +++ b/cmd/client/view.go @@ -22,8 +22,8 @@ func (a app) View() string { desktopNotifications(a.pomodoro) } - serverStatus = colour.Sprintf("^D^1disconnected: %v^R\n", client.LastErr) - if client.Connected() { + serverStatus = colour.Sprintf("^D^1%v^R\n", client.LastErr) + if client.Connected() && client.LastErr == nil { serverStatus = colour.Sprintf("^D^2connected to %s^R\n", client.Server) }