mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-31 11:17:17 +00:00
@@ -157,7 +157,7 @@
|
||||
*/
|
||||
Mailbox.prototype.init = function(data) {
|
||||
var _this = this;
|
||||
if (data.headers) {
|
||||
if (angular.isUndefined(this.uidsMap) || data.headers) {
|
||||
this.$isLoading = true;
|
||||
this.$messages = [];
|
||||
this.uidsMap = {};
|
||||
|
||||
@@ -474,9 +474,9 @@
|
||||
* @param {string} filename - the filename of the attachment to delete
|
||||
*/
|
||||
Message.prototype.$deleteAttachment = function(filename) {
|
||||
var action = 'deleteAttachment?filename=' + filename;
|
||||
var data = { 'filename': filename };
|
||||
var _this = this;
|
||||
Message.$$resource.post(this.$absolutePath({asDraft: true}), action).then(function(data) {
|
||||
Message.$$resource.fetch(this.$absolutePath({asDraft: true}), 'deleteAttachment', data).then(function(data) {
|
||||
Message.$timeout(function() {
|
||||
_this.editable.attachmentAttrs = _.filter(_this.editable.attachmentAttrs, function(attachment) {
|
||||
return attachment.filename != filename;
|
||||
|
||||
Reference in New Issue
Block a user