mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-01 04:22:15 +08:00
move 3 Subscribables into single Computable
This commit is contained in:
parent
1d96160a38
commit
70093e4d23
1 changed files with 1 additions and 12 deletions
|
@ -89,8 +89,6 @@ export const MessageUserStore = new class {
|
|||
listLoading: false,
|
||||
// Happens when message(s) removed from list
|
||||
listIsIncomplete: false,
|
||||
// when this.listLoading || this.listIsIncomplete
|
||||
listIsLoading: false,
|
||||
|
||||
selectorMessageSelected: null,
|
||||
selectorMessageFocused: null,
|
||||
|
@ -112,13 +110,12 @@ export const MessageUserStore = new class {
|
|||
// Computed Observables
|
||||
|
||||
addComputablesTo(this, {
|
||||
/*
|
||||
listIsLoading: () => {
|
||||
const value = this.listLoading() | this.listIsIncomplete();
|
||||
$htmlCL.toggle('list-loading', value);
|
||||
return value;
|
||||
},
|
||||
*/
|
||||
|
||||
listPageCount: () => Math.max(1, Math.ceil(this.listCount() / SettingsUserStore.messagesPerPage())),
|
||||
|
||||
mainMessageListSearch: {
|
||||
|
@ -164,14 +161,6 @@ export const MessageUserStore = new class {
|
|||
// Subscribers
|
||||
|
||||
addSubscribablesTo(this, {
|
||||
listIsLoading: value => $htmlCL.toggle('list-loading', value),
|
||||
|
||||
listLoading: value =>
|
||||
this.listIsLoading(value || this.listIsIncomplete()),
|
||||
|
||||
listIsIncomplete: value =>
|
||||
this.listIsLoading(value || this.listLoading()),
|
||||
|
||||
message: message => {
|
||||
clearTimeout(MessageSeenTimer);
|
||||
if (message) {
|
||||
|
|
Loading…
Reference in a new issue