Fix update server info failed. Display temp&uptime

This commit is contained in:
Junyuan Feng
2022-02-08 19:04:55 +08:00
parent 10c874e7d4
commit b7b8d33bd9
3 changed files with 27 additions and 9 deletions

View File

@@ -293,7 +293,19 @@ class _ServerPageState extends State<ServerPage>
case ServerConnectionState.disconnected:
return 'Disconnected';
case ServerConnectionState.connected:
return temp == '' ? (upTime == '' ? 'Loading...' : upTime) : temp;
if (temp == '') {
if (upTime == '') {
return 'Loading...';
} else {
return upTime;
}
} else {
if (upTime == '') {
return temp;
} else {
return '$temp | $upTime';
}
}
case ServerConnectionState.connecting:
return 'Connecting...';
case ServerConnectionState.failed: