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) {
|
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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue