mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-02 15:45:33 +00:00
feat(mail): Add an option in Preferences to display full email instead of name alone in mailboxes
This commit is contained in:
1 parent
8babb23c58
commit
2e670f7e62
10 files changed
+47
-7
No files matched your search
@@ -273,7 +273,7 @@
|
||||
* @desc Format the first address of a specific type with a short description.
|
||||
* @returns a string of the name or the email of the envelope address type
|
||||
*/
|
||||
Message.prototype.$shortAddress = function (type) {
|
||||
Message.prototype.$shortAddress = function (type, fullEmail) {
|
||||
var address = '';
|
||||
if (this[type]) {
|
||||
if (angular.isString(this[type])) {
|
||||
@@ -289,7 +289,16 @@
|
||||
}
|
||||
else if (this[type].length > 0) {
|
||||
// We have an array of objects; pick the first one
|
||||
address = this[type][0].name || this[type][0].email || '';
|
||||
if(!fullEmail)
|
||||
address = this[type][0].name || this[type][0].email || '';
|
||||
else if(this[type][0].name && this[type][0].email)
|
||||
address = this[type][0].name + ' <' + this[type][0].email +'>';
|
||||
else if(this[type][0].name)
|
||||
address = this[type][0].name;
|
||||
else if(this[type][0].email)
|
||||
address = this[type][0].email;
|
||||
else
|
||||
address = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user