mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03: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,
|
listLoading: false,
|
||||||
// Happens when message(s) removed from list
|
// Happens when message(s) removed from list
|
||||||
listIsIncomplete: false,
|
listIsIncomplete: false,
|
||||||
// when this.listLoading || this.listIsIncomplete
|
|
||||||
listIsLoading: false,
|
|
||||||
|
|
||||||
selectorMessageSelected: null,
|
selectorMessageSelected: null,
|
||||||
selectorMessageFocused: null,
|
selectorMessageFocused: null,
|
||||||
|
|
@ -112,13 +110,12 @@ export const MessageUserStore = new class {
|
||||||
// Computed Observables
|
// Computed Observables
|
||||||
|
|
||||||
addComputablesTo(this, {
|
addComputablesTo(this, {
|
||||||
/*
|
|
||||||
listIsLoading: () => {
|
listIsLoading: () => {
|
||||||
const value = this.listLoading() | this.listIsIncomplete();
|
const value = this.listLoading() | this.listIsIncomplete();
|
||||||
$htmlCL.toggle('list-loading', value);
|
$htmlCL.toggle('list-loading', value);
|
||||||
return value;
|
return value;
|
||||||
},
|
},
|
||||||
*/
|
|
||||||
listPageCount: () => Math.max(1, Math.ceil(this.listCount() / SettingsUserStore.messagesPerPage())),
|
listPageCount: () => Math.max(1, Math.ceil(this.listCount() / SettingsUserStore.messagesPerPage())),
|
||||||
|
|
||||||
mainMessageListSearch: {
|
mainMessageListSearch: {
|
||||||
|
|
@ -164,14 +161,6 @@ export const MessageUserStore = new class {
|
||||||
// Subscribers
|
// Subscribers
|
||||||
|
|
||||||
addSubscribablesTo(this, {
|
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 => {
|
message: message => {
|
||||||
clearTimeout(MessageSeenTimer);
|
clearTimeout(MessageSeenTimer);
|
||||||
if (message) {
|
if (message) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue