Found more JSON properties to change into JavaScript camelCase

This commit is contained in:
the-djmaze 2023-01-26 10:41:55 +01:00
parent b9ef8ae2c9
commit 974350ebee
45 changed files with 361 additions and 412 deletions

View file

@ -23,13 +23,12 @@ import {
} from 'Common/Globals';
import { arrayLength } from 'Common/Utils';
import { download, mailToHelper, showMessageComposer, moveAction } from 'Common/UtilsUser';
import { download, downloadZip, mailToHelper, showMessageComposer, moveAction } from 'Common/UtilsUser';
import { isFullscreen, exitFullscreen, toggleFullscreen } from 'Common/Fullscreen';
import { SMAudio } from 'Common/Audio';
import { i18n } from 'Common/Translator';
import { attachmentDownload } from 'Common/Links';
import { MessageFlagsCache } from 'Common/Cache';
@ -486,21 +485,10 @@ export class MailMessageView extends AbstractViewRight {
const hashes = (currentMessage()?.attachments || [])
.map(item => item?.checked() /*&& !item?.isLinked()*/ ? item.download : '')
.filter(v => v);
if (hashes.length) {
Remote.post('AttachmentsActions', this.downloadAsZipLoading, {
Do: 'Zip',
Hashes: hashes
})
.then(result => {
let hash = result?.Result?.fileHash;
if (hash) {
download(attachmentDownload(hash), hash+'.zip');
} else {
this.downloadAsZipError(true);
}
})
.catch(() => this.downloadAsZipError(true));
}
downloadZip(hashes,
() => this.downloadAsZipError(true),
this.downloadAsZipLoading
);
}
/**