forked from core/mobile_nebula
Safer defaults in an error event for tunnels, fix the details screen when starting
This commit is contained in:
parent
36a55e8b86
commit
8a0fdcf0eb
|
@ -53,10 +53,10 @@ class _SiteDetailScreenState extends State<SiteDetailScreen> {
|
|||
if (lastState != site.connected) {
|
||||
//TODO: connected is set before the nebula object exists leading to a crash race, waiting for "Connected" status is a gross hack but keeps it alive
|
||||
if (site.status == 'Connected') {
|
||||
lastState = site.connected;
|
||||
lastState = true;
|
||||
_listHostmap();
|
||||
} else {
|
||||
lastState = site.connected;
|
||||
lastState = false;
|
||||
activeHosts = null;
|
||||
pendingHosts = null;
|
||||
}
|
||||
|
|
|
@ -30,7 +30,7 @@ class _SiteTunnelsScreenState extends State<SiteTunnelsScreen> {
|
|||
@override
|
||||
void initState() {
|
||||
site = widget.site;
|
||||
tunnels = widget.tunnels;
|
||||
tunnels = widget.tunnels ?? [];
|
||||
_sortTunnels();
|
||||
super.initState();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue