diff options
Diffstat (limited to 'lib/ui.dart')
| -rw-r--r-- | lib/ui.dart | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ui.dart b/lib/ui.dart index 38ace9a..e6cb6f4 100644 --- a/lib/ui.dart +++ b/lib/ui.dart @@ -58,9 +58,13 @@ class ConnectionStatus extends StatelessWidget { builder: (BuildContext context, AppState state, Widget? child) { Icon icon; Text text; - if (state.brokerConnected) { + + if (state.brokerConnected && state.serverConnected) { icon = const Icon(Icons.cloud, color: Colors.green); text = const Text('Connected'); + } else if (state.brokerConnected && !state.serverConnected) { + icon = const Icon(Icons.cloud_off, color: Colors.orange); + text = const Text('Connection issue'); } else { icon = const Icon(Icons.cloud_off, color: Colors.red); text = const Text('Disconnected'); |
