mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 14:07:04 +03:00
cleanup some code
This commit is contained in:
parent
e566494a87
commit
cb2048f163
14 changed files with 32 additions and 117 deletions
|
|
@ -872,7 +872,7 @@ class MessageListMailBoxUserView extends AbstractViewNext {
|
|||
}
|
||||
|
||||
prefetchNextTick() {
|
||||
if (ifvisible && !this.bPrefetch && !ifvisible.now() && this.viewModelVisibility()) {
|
||||
if (ifvisible && !this.bPrefetch && !ifvisible.now() && this.viewModelVisible) {
|
||||
const message = this.messageList().find(
|
||||
item => item && !hasRequestedMessage(item.folderFullNameRaw, item.uid)
|
||||
);
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
|
|||
|
||||
this.showAttachmnetControls = ko.observable(false);
|
||||
|
||||
this.showAttachmnetControlsState = v => Local.set(ClientSideKeyName.MessageAttachmnetControls, !!v);
|
||||
this.showAttachmnetControlsState = v => Local.set(ClientSideKeyName.MessageAttachmentControls, !!v);
|
||||
|
||||
this.allowAttachmnetControls = ko.computed(
|
||||
() => this.attachmentsActions().length && Settings.capa(Capa.AttachmentsActions)
|
||||
|
|
@ -220,7 +220,7 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
|
|||
|
||||
if (message) {
|
||||
this.showAttachmnetControls(false);
|
||||
if (Local.get(ClientSideKeyName.MessageAttachmnetControls)) {
|
||||
if (Local.get(ClientSideKeyName.MessageAttachmentControls)) {
|
||||
setTimeout(() => {
|
||||
this.showAttachmnetControls(true);
|
||||
}, 50);
|
||||
|
|
@ -509,7 +509,7 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
|
|||
* @returns {boolean}
|
||||
*/
|
||||
escShortcuts() {
|
||||
if (this.viewModelVisibility() && this.message()) {
|
||||
if (this.viewModelVisible && this.message()) {
|
||||
const preview = Layout.NoPreview !== this.layout();
|
||||
if (this.fullScreenMode()) {
|
||||
this.fullScreenMode(false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue