3
0
Fork 0

Safer defaults in an error event for tunnels, fix the details screen when starting

This commit is contained in:
Nate Brown 2020-08-07 16:11:26 -05:00
parent 36a55e8b86
commit 8a0fdcf0eb
2 changed files with 3 additions and 3 deletions

View File

@ -53,10 +53,10 @@ class _SiteDetailScreenState extends State<SiteDetailScreen> {
if (lastState != site.connected) { 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 //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') { if (site.status == 'Connected') {
lastState = site.connected; lastState = true;
_listHostmap(); _listHostmap();
} else { } else {
lastState = site.connected; lastState = false;
activeHosts = null; activeHosts = null;
pendingHosts = null; pendingHosts = null;
} }

View File

@ -30,7 +30,7 @@ class _SiteTunnelsScreenState extends State<SiteTunnelsScreen> {
@override @override
void initState() { void initState() {
site = widget.site; site = widget.site;
tunnels = widget.tunnels; tunnels = widget.tunnels ?? [];
_sortTunnels(); _sortTunnels();
super.initState(); super.initState();
} }