mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-07-14 21:04:53 +00:00
(js) Move 'Reply All' action to a distinct button
This commit is contained in:
@@ -212,6 +212,24 @@
|
||||
return address;
|
||||
};
|
||||
|
||||
/**
|
||||
* @function allowReplyAll
|
||||
* @memberof Message.prototype
|
||||
* @desc Check if 'Reply to All' is an appropriate action on the message.
|
||||
* @returns true if the message is not a draft and has more than one recipient
|
||||
*/
|
||||
Message.prototype.allowReplyAll = function() {
|
||||
var recipientsCount = 0;
|
||||
recipientsCount = _.reduce(['to', 'cc'], function(count, type) {
|
||||
if (this[type])
|
||||
return count + this[type].length;
|
||||
else
|
||||
return count;
|
||||
}, recipientsCount, this);
|
||||
|
||||
return !this.isDraft && recipientsCount > 1;
|
||||
};
|
||||
|
||||
/**
|
||||
* @function loadUnsafeContent
|
||||
* @memberof Message.prototype
|
||||
|
||||
Reference in New Issue
Block a user