diff options
author | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2014-04-15 20:37:03 -0700 |
---|---|---|
committer | Hoa V. DINH <dinh.viet.hoa@gmail.com> | 2014-04-15 20:37:03 -0700 |
commit | f5c4792f68154d4a180dbcdeda6984a9a4901ea1 (patch) | |
tree | 868ab134809bd7c288f6318c67989ef3873f1719 | |
parent | 22a8d01483b58664d8f43c0df22da11454e0050b (diff) |
Made very short display string even shorter
-rw-r--r-- | src/core/renderer/MCAddressDisplay.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core/renderer/MCAddressDisplay.cc b/src/core/renderer/MCAddressDisplay.cc index dd2d559a..d8de47fc 100644 --- a/src/core/renderer/MCAddressDisplay.cc +++ b/src/core/renderer/MCAddressDisplay.cc @@ -47,7 +47,11 @@ String * AddressDisplay::veryShortDisplayStringForAddress(Address * address) return (String *) components->objectAtIndex(0); } else if (address->mailbox()) { - return address->mailbox(); + Array * components = address->mailbox()->componentsSeparatedByString(MCSTR("@")); + if (components->count() == 0) { + return MCSTR(""); + } + return (String *) components->objectAtIndex(0); } else { return MCLOCALIZEDSTRING(MCSTR("invalid")); |