Add isLoggedIn to Choo app state

This commit is contained in:
Robbie Antenesse 2019-09-13 22:41:16 -06:00
parent 496787263b
commit 6dab28e7a5
2 changed files with 5 additions and 0 deletions

View File

@ -59,6 +59,7 @@ app.use((state, emitter) => {
state.currentView = 'home';
state.language = app.getSettingsItem('lang') ? app.getSettingsItem('lang') : (navigator.language || navigator.userLanguage).split('-')[0];
state.viewStates = {};
state.isLoggedIn = false;
}
// Listeners

View File

@ -12,4 +12,8 @@ export class ViewController {
}
this.state = this.appState.viewStates[viewName];
}
get isLoggedIn () {
return this.appState.isLoggedIn;
}
}