Fix authentication process. App register in background

This commit is contained in:
estevez-dev
2019-06-16 16:32:55 +03:00
parent ad6355503b
commit ef15026203
5 changed files with 64 additions and 45 deletions

View File

@ -58,7 +58,6 @@ class HomeAssistant {
futures.add(_getServices());
futures.add(_getUserInfo());
futures.add(_getPanels());
futures.add(checkAppRegistration());
futures.add(Connection().sendSocketMessage(
type: "subscribe_events",
additionalData: {"event_type": "state_changed"},
@ -67,6 +66,7 @@ class HomeAssistant {
if (isMobileAppEnabled) {
_createUI();
_fetchCompleter.complete();
checkAppRegistration();
} else {
_fetchCompleter.completeError(HAError("Mobile app component not found", actions: [HAErrorAction.tryAgain(), HAErrorAction(type: HAErrorActionType.URL ,title: "Help",url: "http://ha-client.homemade.systems/docs#mobile-app")]));
}