mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 03:59:21 +03:00
Array.from() to spread syntax
This commit is contained in:
parent
07b002a66a
commit
df1d0fc8d6
6 changed files with 27 additions and 7 deletions
|
|
@ -397,8 +397,28 @@ class MessageViewMailBoxUserView extends AbstractViewNext {
|
|||
* @param {Object} oAttachment
|
||||
* @returns {boolean}
|
||||
*/
|
||||
attachmentPreview() {
|
||||
// TODO: add lightgallery alternative?
|
||||
attachmentPreview(/*attachment*/) {
|
||||
/*
|
||||
if (attachment && attachment.isImage() && !attachment.isLinked && this.message() && this.message().attachments()) {
|
||||
const items = this.message().attachments().map(item => {
|
||||
if (item && !item.isLinked && item.isImage()) {
|
||||
if (item === attachment) {
|
||||
index = listIndex;
|
||||
}
|
||||
++listIndex;
|
||||
return {
|
||||
src: item.linkPreview(),
|
||||
msrc: item.linkThumbnail(),
|
||||
title: item.fileName
|
||||
};
|
||||
}
|
||||
return null;
|
||||
}).filter(value => !!value);
|
||||
|
||||
if (items.length) {
|
||||
}
|
||||
}
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue