mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-07 13:42:20 +03:00
this.addObservables() to addObservablesTo()
This commit is contained in:
parent
839ebfb350
commit
7fac6ca9dd
30 changed files with 78 additions and 58 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import ko from 'ko';
|
||||
import { addObservablesTo, addComputablesTo, addSubscribablesTo } from 'External/ko';
|
||||
|
||||
import { Scope } from 'Common/Enums';
|
||||
|
||||
|
|
@ -92,7 +93,7 @@ export class MailMessageView extends AbstractViewRight {
|
|||
|
||||
this.msgDefaultAction = SettingsUserStore.msgDefaultAction;
|
||||
|
||||
this.addObservables({
|
||||
addObservablesTo(this, {
|
||||
showAttachmentControls: !!Local.get(ClientSideKeyNameMessageAttachmentControls),
|
||||
downloadAsZipLoading: false,
|
||||
showFullInfo: '1' === Local.get(ClientSideKeyNameMessageHeaderFullInfo),
|
||||
|
|
@ -132,7 +133,7 @@ export class MailMessageView extends AbstractViewRight {
|
|||
// viewer
|
||||
this.viewHash = '';
|
||||
|
||||
this.addComputables({
|
||||
addComputablesTo(this, {
|
||||
allowAttachmentControls: () => arrayLength(attachmentsActions) && SettingsCapa('AttachmentsActions'),
|
||||
|
||||
downloadAsZipAllowed: () => this.attachmentsActions.includes('zip')
|
||||
|
|
@ -174,7 +175,7 @@ export class MailMessageView extends AbstractViewRight {
|
|||
() => MessagelistUserStore.isLoading() | MessageUserStore.loading()
|
||||
});
|
||||
|
||||
this.addSubscribables({
|
||||
addSubscribablesTo(this, {
|
||||
message: message => {
|
||||
if (message) {
|
||||
if (this.viewHash !== message.hash) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue