Add path to every view

This commit is contained in:
Yegor Vialov
2020-05-14 16:44:50 +00:00
parent e4d1a4f823
commit 353c80b6bc
5 changed files with 10 additions and 9 deletions

View File

@ -31,7 +31,8 @@ class Panel {
if (componentName.startsWith('haclient')) {
Navigator.of(context).pushNamed(urlPath);
} else if (componentName == 'lovelace') {
HomeAssistant().lovelaceDashboardUrl = this.urlPath;
HomeAssistant().currentDashboardPath = this.urlPath;
Logger.d('Switching to dashboard: ${this.urlPath}');
HomeAssistant().autoUi = false;
SharedPreferences.getInstance().then((prefs) {
prefs.setString('lovelace_dashboard_url', this.urlPath);