forked from mirrors/linphone-iphone
add display name to last message display
This commit is contained in:
parent
ab8d017904
commit
ae94c10763
1 changed files with 5 additions and 4 deletions
|
|
@ -85,12 +85,13 @@
|
|||
|
||||
LinphoneChatMessage *last_msg = linphone_chat_room_get_last_message_in_history(chatRoom);
|
||||
if (last_msg) {
|
||||
NSString *message = [UIChatBubbleTextCell TextMessageForChat:last_msg];
|
||||
NSString *text = [[FastAddressBook displayNameForAddress:linphone_chat_message_get_from_address(last_msg)]
|
||||
stringByAppendingFormat:@" : %@", [UIChatBubbleTextCell TextMessageForChat:last_msg]];
|
||||
// shorten long messages
|
||||
if ([message length] > 50) {
|
||||
message = [[message substringToIndex:50] stringByAppendingString:@"[...]"];
|
||||
if ([text length] > 50) {
|
||||
text = [[text substringToIndex:50] stringByAppendingString:@"[...]"];
|
||||
}
|
||||
_chatContentLabel.text = message;
|
||||
_chatContentLabel.text = text;
|
||||
} else {
|
||||
_chatContentLabel.text = nil;
|
||||
_chatLatestTimeLabel.text = NSLocalizedString(@"Now", nil);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue