mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 20:49:20 +03:00
Merge branch 'master' into addressbook
# Conflicts: # snappymail/v/0.0.0/app/templates/Views/User/PopupsContacts.html
This commit is contained in:
commit
f46e996570
138 changed files with 2587 additions and 1016 deletions
|
|
@ -455,7 +455,7 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
Cc: this.cc(),
|
||||
Bcc: this.bcc(),
|
||||
ReplyTo: this.replyTo(),
|
||||
Subject: this.subject(),
|
||||
subject: this.subject(),
|
||||
DraftInfo: this.aDraftInfo,
|
||||
InReplyTo: this.sInReplyTo,
|
||||
References: this.sReferences,
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { i18n, getNotification } from 'Common/Translator';
|
||||
import { setFolderHash } from 'Common/Cache';
|
||||
|
||||
import { MessageUserStore } from 'Stores/User/Message';
|
||||
import { MessagelistUserStore } from 'Stores/User/Messagelist';
|
||||
|
|
@ -43,10 +42,9 @@ export class FolderClearPopupView extends AbstractViewPopup {
|
|||
|
||||
this.clearingProcess(true);
|
||||
|
||||
folderToClear.messageCountAll(0);
|
||||
folderToClear.messageCountUnread(0);
|
||||
|
||||
setFolderHash(folderToClear.fullName, '');
|
||||
folderToClear.totalEmails(0);
|
||||
folderToClear.unreadEmails(0);
|
||||
folderToClear.hash = '';
|
||||
|
||||
Remote.request('FolderClear', iError => {
|
||||
this.clearingProcess(false);
|
||||
|
|
|
|||
|
|
@ -88,11 +88,14 @@ export class LoginUserView extends AbstractViewLogin {
|
|||
}
|
||||
|
||||
submitCommand(self, event) {
|
||||
const email = this.email().trim();
|
||||
this.email(email);
|
||||
|
||||
let form = event.target.form,
|
||||
data = new FormData(form),
|
||||
valid = form.reportValidity() && fireEvent('sm-user-login', data, 1);
|
||||
|
||||
this.emailError(!this.email());
|
||||
this.emailError(!email);
|
||||
this.passwordError(!this.password());
|
||||
this.formError(!valid);
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import ko from 'ko';
|
|||
import { Scope } from 'Common/Enums';
|
||||
import { moveAction, addShortcut } from 'Common/Globals';
|
||||
import { mailBox, settings } from 'Common/Links';
|
||||
import { setFolderHash } from 'Common/Cache';
|
||||
//import { setFolderHash } from 'Common/Cache';
|
||||
import { addComputablesTo } from 'External/ko';
|
||||
|
||||
import { AppUserStore } from 'Stores/User/App';
|
||||
|
|
@ -100,11 +100,11 @@ export class MailFolderList extends AbstractViewLeft {
|
|||
if (!SettingsUserStore.usePreviewPane()) {
|
||||
MessageUserStore.message(null);
|
||||
}
|
||||
|
||||
/*
|
||||
if (folder.fullName === FolderUserStore.currentFolderFullName()) {
|
||||
setFolderHash(folder.fullName, '');
|
||||
}
|
||||
|
||||
*/
|
||||
hasher.setHash(
|
||||
mailBox(folder.fullNameHash, 1,
|
||||
(event.target.matches('.flag-icon') && !folder.isFlagged()) ? 'flagged' : ''
|
||||
|
|
|
|||
|
|
@ -24,9 +24,7 @@ import { i18n, initOnStartOrLangChange } from 'Common/Translator';
|
|||
|
||||
import {
|
||||
getFolderFromCacheList,
|
||||
MessageFlagsCache,
|
||||
hasRequestedMessage,
|
||||
addRequestedMessage
|
||||
MessageFlagsCache
|
||||
} from 'Common/Cache';
|
||||
|
||||
import { AppUserStore } from 'Stores/User/App';
|
||||
|
|
@ -61,7 +59,6 @@ export class MailMessageList extends AbstractViewRight {
|
|||
constructor() {
|
||||
super();
|
||||
|
||||
this.bPrefetch = false;
|
||||
this.emptySubjectValue = '';
|
||||
|
||||
this.iGoToUpOrDownTimeout = 0;
|
||||
|
|
@ -487,9 +484,9 @@ export class MailMessageList extends AbstractViewRight {
|
|||
});
|
||||
|
||||
if (iThreadUid) {
|
||||
folder.messageCountUnread(Math.max(0, folder.messageCountUnread() - cnt));
|
||||
folder.unreadEmails(Math.max(0, folder.unreadEmails() - cnt));
|
||||
} else {
|
||||
folder.messageCountUnread(0);
|
||||
folder.unreadEmails(0);
|
||||
}
|
||||
|
||||
MessageFlagsCache.clearFolder(sFolderFullName);
|
||||
|
|
@ -817,35 +814,6 @@ export class MailMessageList extends AbstractViewRight {
|
|||
addShortcut('arrowright', 'meta', Scope.MessageView, ()=>false);
|
||||
|
||||
addShortcut('f', 'meta', Scope.MessageList, ()=>this.advancedSearchClick());
|
||||
|
||||
if (!ThemeStore.isMobile() && SettingsCapa('Prefetch')) {
|
||||
ifvisible.idle(this.prefetchNextTick.bind(this));
|
||||
}
|
||||
}
|
||||
|
||||
prefetchNextTick() {
|
||||
if (!this.bPrefetch && !ifvisible.now() && !this.viewModelDom.hidden) {
|
||||
const message = MessagelistUserStore.find(
|
||||
item => item && !hasRequestedMessage(item.folder, item.uid)
|
||||
);
|
||||
if (message) {
|
||||
this.bPrefetch = true;
|
||||
|
||||
addRequestedMessage(message.folder, message.uid);
|
||||
|
||||
Remote.message(
|
||||
iError => {
|
||||
const next = !iError;
|
||||
setTimeout(() => {
|
||||
this.bPrefetch = false;
|
||||
next && this.prefetchNextTick();
|
||||
}, 1000);
|
||||
},
|
||||
message.folder,
|
||||
message.uid
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
advancedSearchClick() {
|
||||
|
|
|
|||
|
|
@ -147,6 +147,8 @@ export class MailMessageView extends AbstractViewRight {
|
|||
)
|
||||
},
|
||||
|
||||
tagsAllowed: () => FolderUserStore.currentFolder() ? FolderUserStore.currentFolder().tagsAllowed() : false,
|
||||
|
||||
messageVisibility: () => !MessageUserStore.loading() && !!currentMessage(),
|
||||
|
||||
canBeRepliedOrForwarded: () => !this.isDraftFolder() && this.messageVisibility(),
|
||||
|
|
@ -575,7 +577,7 @@ export class MailMessageView extends AbstractViewRight {
|
|||
MessageFolder: oMessage.folder,
|
||||
MessageUid: oMessage.uid,
|
||||
ReadReceipt: oMessage.readReceipt(),
|
||||
Subject: i18n('READ_RECEIPT/SUBJECT', { SUBJECT: oMessage.subject() }),
|
||||
subject: i18n('READ_RECEIPT/SUBJECT', { SUBJECT: oMessage.subject() }),
|
||||
Text: i18n('READ_RECEIPT/BODY', { 'READ-RECEIPT': AccountUserStore.email() })
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue