mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Cleanup some code
This commit is contained in:
parent
3ea2f5f452
commit
9fc5a3ff6a
6 changed files with 31 additions and 25 deletions
2
dev/External/User/ko.js
vendored
2
dev/External/User/ko.js
vendored
|
|
@ -90,6 +90,7 @@ ko.bindingHandlers.emailsTags = {
|
|||
}
|
||||
};
|
||||
|
||||
// Start dragging selected messages
|
||||
ko.bindingHandlers.draggable = {
|
||||
init: (element, fValueAccessor) => {
|
||||
if (!rl.settings.app('mobile')) {
|
||||
|
|
@ -98,6 +99,7 @@ ko.bindingHandlers.draggable = {
|
|||
}
|
||||
};
|
||||
|
||||
// Drop selected messages on folder
|
||||
ko.bindingHandlers.droppable = {
|
||||
init: (element, fValueAccessor) => {
|
||||
if (!rl.settings.app('mobile')) {
|
||||
|
|
|
|||
|
|
@ -67,6 +67,21 @@ class ComposeAttachmentModel extends AbstractModel {
|
|||
]);
|
||||
}
|
||||
|
||||
static fromAttachment(item)
|
||||
{
|
||||
const attachment = new ComposeAttachmentModel(
|
||||
item.download,
|
||||
item.fileName,
|
||||
item.estimatedSize,
|
||||
item.isInline,
|
||||
item.isLinked,
|
||||
item.cid,
|
||||
item.contentLocation
|
||||
);
|
||||
attachment.fromMessage = true;
|
||||
return attachment;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {AjaxJsonComposeAttachment} json
|
||||
* @returns {boolean}
|
||||
|
|
|
|||
|
|
@ -1390,17 +1390,7 @@ class ComposePopupView extends AbstractViewNext {
|
|||
}
|
||||
|
||||
if (add) {
|
||||
const attachment = new ComposeAttachmentModel(
|
||||
item.download,
|
||||
item.fileName,
|
||||
item.estimatedSize,
|
||||
item.isInline,
|
||||
item.isLinked,
|
||||
item.cid,
|
||||
item.contentLocation
|
||||
);
|
||||
|
||||
attachment.fromMessage = true;
|
||||
const attachment = ComposeAttachmentModel.fromAttachment(item);
|
||||
attachment.cancel = this.cancelAttachmentHelper(item.download);
|
||||
attachment
|
||||
.waiting(false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue