mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-04 15:07:02 +03:00
Switch from ko.computed to ko.pureComputed
This should provide performance and memory benefits over regular computed observables
This commit is contained in:
parent
ac2238a23f
commit
954de06f86
18 changed files with 55 additions and 37 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import ko from 'ko';
|
||||
import { koComputable } from 'External/ko';
|
||||
|
||||
import { convertLangName } from 'Common/Translator';
|
||||
|
||||
|
|
@ -13,7 +14,7 @@ class LanguagesPopupView extends AbstractViewPopup {
|
|||
|
||||
this.langs = ko.observableArray();
|
||||
|
||||
this.languages = ko.computed(() => {
|
||||
this.languages = koComputable(() => {
|
||||
const userLanguage = this.userLanguage();
|
||||
return this.langs.map(language => ({
|
||||
key: language,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue