Wrap empty navigate action
This commit is contained in:
parent
44acabadfe
commit
7d30c2f9d5
@ -58,7 +58,7 @@ class EntityWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case EntityUIAction.navigate: {
|
case EntityUIAction.navigate: {
|
||||||
if (uiAction.tapService.startsWith("/")) {
|
if (uiAction.tapService != null && uiAction.tapService.startsWith("/")) {
|
||||||
//TODO handle local urls
|
//TODO handle local urls
|
||||||
Logger.w("Local urls is not supported yet");
|
Logger.w("Local urls is not supported yet");
|
||||||
} else {
|
} else {
|
||||||
@ -98,7 +98,7 @@ class EntityWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case EntityUIAction.navigate: {
|
case EntityUIAction.navigate: {
|
||||||
if (uiAction.holdService.startsWith("/")) {
|
if (uiAction.holdService != null && uiAction.holdService.startsWith("/")) {
|
||||||
//TODO handle local urls
|
//TODO handle local urls
|
||||||
Logger.w("Local urls is not supported yet");
|
Logger.w("Local urls is not supported yet");
|
||||||
} else {
|
} else {
|
||||||
|
@ -98,20 +98,22 @@ class ConnectionManager {
|
|||||||
|
|
||||||
void _doConnect({Completer completer, bool forceReconnect}) {
|
void _doConnect({Completer completer, bool forceReconnect}) {
|
||||||
if (forceReconnect || !isConnected) {
|
if (forceReconnect || !isConnected) {
|
||||||
_connect().timeout(connectTimeout).then((_) {
|
_disconnect().then((_){
|
||||||
completer?.complete();
|
_connect().timeout(connectTimeout).then((_) {
|
||||||
}).catchError((e) {
|
completer?.complete();
|
||||||
_disconnect().then((_) {
|
}).catchError((e) {
|
||||||
if (e is TimeoutException) {
|
_disconnect().then((_) {
|
||||||
if (connecting != null && !connecting.isCompleted) {
|
if (e is TimeoutException) {
|
||||||
connecting.completeError(HAError("Connection timeout"));
|
if (connecting != null && !connecting.isCompleted) {
|
||||||
|
connecting.completeError(HAError("Connection timeout"));
|
||||||
|
}
|
||||||
|
completer?.completeError(HAError("Connection timeout"));
|
||||||
|
} else if (e is HAError) {
|
||||||
|
completer?.completeError(e);
|
||||||
|
} else {
|
||||||
|
completer?.completeError(HAError("${e.toString()}"));
|
||||||
}
|
}
|
||||||
completer?.completeError(HAError("Connection timeout"));
|
});
|
||||||
} else if (e is HAError) {
|
|
||||||
completer?.completeError(e);
|
|
||||||
} else {
|
|
||||||
completer?.completeError(HAError("${e.toString()}"));
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user