mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-09-03 20:55:08 +00:00
@@ -26,6 +26,15 @@
|
||||
this.init(futureMessageData);
|
||||
}
|
||||
this.uid = parseInt(futureMessageData.uid);
|
||||
this.level = parseInt(futureMessageData.level);
|
||||
this.first = parseInt(futureMessageData.first) === 1;
|
||||
if (this.first) {
|
||||
this.threadCount = parseInt(futureMessageData.count);
|
||||
this.collapsed = (futureMessageData.collapsed === true);
|
||||
}
|
||||
else if (!isNaN(this.level) && this.level >= 0) {
|
||||
this.threadMember = true;
|
||||
}
|
||||
}
|
||||
else {
|
||||
// The promise will be unwrapped first
|
||||
@@ -539,7 +548,7 @@
|
||||
};
|
||||
|
||||
/**
|
||||
* @function $markAsFlaggedOrUnflagged
|
||||
* @function toggleFlag
|
||||
* @memberof Message.prototype
|
||||
* @desc Add or remove a the \\Flagged flag on the current message.
|
||||
* @returns a promise of the HTTP operation
|
||||
@@ -558,6 +567,24 @@
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* @function toggleThread
|
||||
* @memberof Message.prototype
|
||||
* @desc Collapse or expand mail thread
|
||||
* @returns a promise of the HTTP operation
|
||||
*/
|
||||
Message.prototype.toggleThread = function() {
|
||||
var _this = this,
|
||||
action = 'markMessageCollapse';
|
||||
|
||||
if (this.collapsed)
|
||||
action = 'markMessageUncollapse';
|
||||
|
||||
this.collapsed = !this.collapsed;
|
||||
|
||||
return Message.$$resource.post(this.$absolutePath(), action);
|
||||
};
|
||||
|
||||
/**
|
||||
* @function $isLoading
|
||||
* @memberof Message.prototype
|
||||
|
||||
Reference in New Issue
Block a user