Merge branch 'master' into addressbook

This commit is contained in:
the-djmaze 2022-05-31 21:25:59 +02:00
commit 84c1fb5402
60 changed files with 574 additions and 629 deletions

View file

@ -20,7 +20,7 @@ import { messagesDeleteHelper } from 'Common/Folders';
import { serverRequest } from 'Common/Links';
import { i18n, getNotification, getUploadErrorDescByCode, timestampToString } from 'Common/Translator';
import { MessageFlagsCache, setFolderHash } from 'Common/Cache';
import { Settings, SettingsGet, elementById, addShortcut } from 'Common/Globals';
import { Settings, SettingsCapa, SettingsGet, elementById, addShortcut } from 'Common/Globals';
//import { exitFullscreen, isFullscreen, toggleFullscreen } from 'Common/Fullscreen';
import { AppUserStore } from 'Stores/User/App';
@ -236,6 +236,7 @@ export class ComposePopupView extends AbstractViewPopup {
this.sLastFocusedField = 'to';
this.allowContacts = AppUserStore.allowContacts();
this.allowIdentities = SettingsCapa('Identities');
this.bSkipNextHide = false;

View file

@ -571,21 +571,12 @@ export class MailMessageList extends AbstractViewRight {
seenMessagesFast(seen) {
const checked = MessagelistUserStore.listCheckedOrSelected();
if (checked.length) {
if (undefined === seen) {
const unseen = checked.filter(message => message.isUnseen());
listAction(
checked[0].folder,
unseen.length ? MessageSetAction.SetSeen : MessageSetAction.UnsetSeen,
checked
);
} else {
listAction(
checked[0].folder,
seen ? MessageSetAction.SetSeen : MessageSetAction.UnsetSeen,
checked
);
}
if (checked.length && null != seen) {
listAction(
checked[0].folder,
seen ? MessageSetAction.SetSeen : MessageSetAction.UnsetSeen,
checked
);
}
}

View file

@ -123,9 +123,6 @@ export class MailMessageView extends AbstractViewRight {
this.fullScreenMode = isFullscreen;
this.toggleFullScreen = toggleFullscreen;
this.messageListOfThreadsLoading = ko.observable(false).extend({ rateLimit: 1 });
this.highlightUnselectedAttachments = ko.observable(false).extend({ falseTimeout: 2000 });
this.downloadAsZipError = ko.observable(false).extend({ falseTimeout: 7000 });
this.messageDomFocused = ko.observable(false).extend({ rateLimit: 0 });
@ -136,7 +133,10 @@ export class MailMessageView extends AbstractViewRight {
this.addComputables({
allowAttachmentControls: () => arrayLength(attachmentsActions) && SettingsCapa('AttachmentsActions'),
downloadAsZipAllowed: () => this.attachmentsActions.includes('zip') && this.allowAttachmentControls(),
downloadAsZipAllowed: () => this.attachmentsActions.includes('zip')
&& (currentMessage() ? currentMessage().attachments : [])
.filter(item => item && !item.isLinked() && item.checked() && item.download)
.length,
lastReplyAction: {
read: this.lastReplyAction_,
@ -538,8 +538,6 @@ export class MailMessageView extends AbstractViewRight {
}
})
.catch(() => this.downloadAsZipError(true));
} else {
this.highlightUnselectedAttachments(true);
}
}
@ -566,20 +564,20 @@ export class MailMessageView extends AbstractViewRight {
readReceipt() {
let oMessage = currentMessage()
if (oMessage.readReceipt()) {
Remote.request('SendReadReceiptMessage', null, {
Remote.request('SendReadReceiptMessage', iError => {
if (!iError) {
oMessage.flags.push('$mdnsent');
// oMessage.flags.valueHasMutated();
MessageFlagsCache.store(oMessage);
MessagelistUserStore.reloadFlagsAndCachedMessage();
}
}, {
MessageFolder: oMessage.folder,
MessageUid: oMessage.uid,
ReadReceipt: oMessage.readReceipt(),
Subject: i18n('READ_RECEIPT/SUBJECT', { SUBJECT: oMessage.subject() }),
Text: i18n('READ_RECEIPT/BODY', { 'READ-RECEIPT': AccountUserStore.email() })
});
oMessage.flags.push('$mdnsent');
// oMessage.flags.valueHasMutated();
MessageFlagsCache.store(oMessage);
MessagelistUserStore.reloadFlagsAndCachedMessage();
}
}