WIP #523 and connection settings refactoring

This commit is contained in:
Yegor Vialov
2020-05-02 23:02:18 +00:00
parent 96c8338890
commit 725ec9291d
11 changed files with 329 additions and 153 deletions

View File

@ -53,7 +53,10 @@ class ConnectionManager {
httpWebHost =
"${prefs.getString('hassio-res-protocol')}://$_domain:$_port";
Logger.d('$_domain$_port');
if ((_domain == null) || (_port == null) ||
if (_domain == null && _port == null && webhookId == null && mobileAppDeviceName == null) {
completer.completeError(HACNotSetUpException());
stopInit = true;
} else if ((_domain == null) || (_port == null) ||
(_domain.isEmpty) || (_port.isEmpty)) {
completer.completeError(HACException.checkConnectionSettings());
stopInit = true;