aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2014-04-15 20:37:03 -0700
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2014-04-15 20:37:03 -0700
commitf5c4792f68154d4a180dbcdeda6984a9a4901ea1 (patch)
tree868ab134809bd7c288f6318c67989ef3873f1719 /src/core
parent22a8d01483b58664d8f43c0df22da11454e0050b (diff)
Made very short display string even shorter
Diffstat (limited to 'src/core')
-rw-r--r--src/core/renderer/MCAddressDisplay.cc6
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"));