mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-12-31 03:52:01 +08:00
0b64083543
Array.isNotEmpty to isNonEmptyArray
18 lines
540 B
JavaScript
18 lines
540 B
JavaScript
import ko from 'ko';
|
|
import { Settings, SettingsGet } from 'Common/Globals';
|
|
import { isArray } from 'Common/Utils';
|
|
|
|
export const LanguageStore = {
|
|
languages: ko.observableArray(),
|
|
userLanguage: ko.observable(''),
|
|
|
|
populate: function() {
|
|
const aLanguages = Settings.app('languages');
|
|
this.languages(isArray(aLanguages) ? aLanguages : []);
|
|
this.language(SettingsGet('Language'));
|
|
this.userLanguage(SettingsGet('UserLanguage'));
|
|
}
|
|
}
|
|
|
|
LanguageStore.language = ko.observable('')
|
|
.extend({ limitedList: LanguageStore.languages });
|