fix: better error display in TUI

- always show `client.LasErr` if not `nil`
This commit is contained in:
Sebastian Mark 2024-11-13 17:17:39 +01:00
parent d25ce3eead
commit b7fc646cc0

View file

@ -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)
}