diff --git a/lib/screens/SiteDetailScreen.dart b/lib/screens/SiteDetailScreen.dart index 160bfb1..58b2c38 100644 --- a/lib/screens/SiteDetailScreen.dart +++ b/lib/screens/SiteDetailScreen.dart @@ -53,10 +53,10 @@ class _SiteDetailScreenState extends State { 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; } diff --git a/lib/screens/SiteTunnelsScreen.dart b/lib/screens/SiteTunnelsScreen.dart index d863306..b3c3b6e 100644 --- a/lib/screens/SiteTunnelsScreen.dart +++ b/lib/screens/SiteTunnelsScreen.dart @@ -30,7 +30,7 @@ class _SiteTunnelsScreenState extends State { @override void initState() { site = widget.site; - tunnels = widget.tunnels; + tunnels = widget.tunnels ?? []; _sortTunnels(); super.initState(); }