Switch from ko.computed to ko.pureComputed

This should provide performance and memory benefits over regular computed observables
This commit is contained in:
djmaze 2021-12-31 13:30:05 +01:00
parent ac2238a23f
commit 954de06f86
18 changed files with 55 additions and 37 deletions

View file

@ -64,10 +64,6 @@ export class MailMessageList extends AbstractViewRight {
this.messageList = MessageUserStore.list;
this.sortSupported = ko.computed(() =>
FolderUserStore.hasCapability('SORT') | FolderUserStore.hasCapability('ESORT')
);
this.composeInEdit = AppUserStore.composeInEdit;
this.isMobile = ThemeStore.isMobile;
@ -107,6 +103,9 @@ export class MailMessageList extends AbstractViewRight {
this.addComputables({
sortSupported: () =>
FolderUserStore.hasCapability('SORT') | FolderUserStore.hasCapability('ESORT'),
folderMenuForMove: () =>
folderListOptionsBuilder(
[FolderUserStore.currentFolderFullName()],