Remove unused currentView state variable
This commit is contained in:
parent
b093595f1d
commit
192a78188c
|
@ -12,12 +12,6 @@ export const appListeners = (app, state, emitter) => {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
emitter.on('change-view', newView => {
|
|
||||||
// Change the view and call render. Makes it easier to call within views.
|
|
||||||
state.currentView = newView;
|
|
||||||
emitter.emit('render', () => { });
|
|
||||||
});
|
|
||||||
|
|
||||||
emitter.on('set-language', newLanguage => {
|
emitter.on('set-language', newLanguage => {
|
||||||
app.setSettingsItem('lang', newLanguage);
|
app.setSettingsItem('lang', newLanguage);
|
||||||
state.language = newLanguage;
|
state.language = newLanguage;
|
||||||
|
|
|
@ -8,7 +8,6 @@ export const appState = (app, state, emitter) => {
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
// Default state variables
|
// Default state variables
|
||||||
state.currentView = 'home';
|
|
||||||
state.language = app.getSettingsItem('lang') ? app.getSettingsItem('lang') : (navigator.language || navigator.userLanguage).split('-')[0];
|
state.language = app.getSettingsItem('lang') ? app.getSettingsItem('lang') : (navigator.language || navigator.userLanguage).split('-')[0];
|
||||||
state.viewStates = {};
|
state.viewStates = {};
|
||||||
state.isLoggedIn = false;
|
state.isLoggedIn = false;
|
||||||
|
|
Loading…
Reference in New Issue