WebVIew UI settings

This commit is contained in:
Yegor Vialov
2020-02-11 20:53:29 +00:00
parent 8a80d0c5d1
commit 01226cb9eb
4 changed files with 73 additions and 6 deletions

View File

@ -20,7 +20,7 @@ class ConnectionManager {
String oauthUrl;
String webhookId;
bool useLovelace = true;
bool useWebView = true;
bool useWebView = false;
bool settingsLoaded = false;
bool get isAuthenticated => _token != null;
StreamSubscription _socketSubscription;
@ -42,6 +42,7 @@ class ConnectionManager {
Logger.e("Loading settings...");
SharedPreferences prefs = await SharedPreferences.getInstance();
useLovelace = prefs.getBool('use-lovelace') ?? true;
useWebView = prefs.getBool("use-webview") ?? false;
_domain = prefs.getString('hassio-domain');
_port = prefs.getString('hassio-port');
webhookId = prefs.getString('app-webhook-id');