mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 05:59:21 +03:00
More ko.computed to pureComputed
This commit is contained in:
parent
a15454fd15
commit
679d7356e0
8 changed files with 46 additions and 50 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import ko from 'ko';
|
||||
import { koComputable } from 'External/ko';
|
||||
|
||||
import { Scope, Notification } from 'Common/Enums';
|
||||
import { MessageSetAction } from 'Common/EnumsUser';
|
||||
|
|
@ -149,16 +150,13 @@ export const MessageUserStore = new class {
|
|||
}
|
||||
});
|
||||
|
||||
this.listChecked = ko
|
||||
.computed(() => this.list.filter(isChecked))
|
||||
this.listChecked = koComputable(() => this.list.filter(isChecked))
|
||||
.extend({ rateLimit: 0 });
|
||||
|
||||
this.hasCheckedMessages = ko
|
||||
.computed(() => !!this.list.find(isChecked))
|
||||
this.hasCheckedMessages = koComputable(() => !!this.list.find(isChecked))
|
||||
.extend({ rateLimit: 0 });
|
||||
|
||||
this.hasCheckedOrSelected = ko
|
||||
.computed(() => !!(this.selectorMessageSelected()
|
||||
this.hasCheckedOrSelected = koComputable(() => !!(this.selectorMessageSelected()
|
||||
|| this.selectorMessageFocused()
|
||||
|| this.list.find(item => item.checked())))
|
||||
.extend({ rateLimit: 50 });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue