From 6375f79a4e38edd3fb85d53afd4a33fc64e877f4 Mon Sep 17 00:00:00 2001 From: pianoslum Date: Mon, 1 Dec 2014 18:51:16 +0900 Subject: [PATCH 1/2] Show "Me (foo@bar.com)" in between-column if more than one identity is registered --- modules/monkeypatch.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/monkeypatch.js b/modules/monkeypatch.js index 18f9ea262..eeaeb8958 100644 --- a/modules/monkeypatch.js +++ b/modules/monkeypatch.js @@ -158,11 +158,15 @@ MonkeyPatch.prototype = { // Helper for formatting; depending on the locale, we may need a different // for me as in "to me" or as in "from me". let format = function (x, p) { - if (getIdentityForEmail(x.email)) - return (p + if (getIdentityForEmail(x.email)) { + let display = (p ? strings.get("meBetweenMeAndSomeone") : strings.get("meBetweenSomeoneAndMe") ); + if (getIdentities().length > 1) + display += " (" + x.email + ")"; + return display; + } else return x.name || x.email; }; From 1e48c8194f420440ef53776b85634e293b903f88 Mon Sep 17 00:00:00 2001 From: pianoslum Date: Mon, 1 Dec 2014 19:47:06 +0900 Subject: [PATCH 2/2] Show "Me (foo@bar.com)" in conversation header if more than one identity is registered --- modules/contact.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/contact.js b/modules/contact.js index b28051de9..98495f5fd 100644 --- a/modules/contact.js +++ b/modules/contact.js @@ -301,11 +301,15 @@ let ContactMixIn = { getName: function _ContactMixIn_getName (aPosition, aIsDetail) { Log.assert(aPosition === Contacts.kFrom || aPosition === Contacts.kTo, "Someone did not set the 'position' properly"); - if (getIdentityForEmail(this._email) && !aIsDetail) - return ((aPosition === Contacts.kFrom) + if (getIdentityForEmail(this._email) && !aIsDetail) { + let display = ((aPosition === Contacts.kFrom) ? strings.get("meFromMeToSomeone") : strings.get("meFromSomeoneToMe") ); + if (getIdentities().length > 1) + display += " (" + this._email + ")"; + return display; + } else return this._name || this._email; },