fix last update time chat room

This commit is contained in:
Benjamin Reis 2018-02-26 15:36:04 +01:00
parent 74c0f46dfa
commit 2b9abae0cc
2 changed files with 5 additions and 7 deletions

View file

@ -146,9 +146,9 @@ static int sorted_history_comparison(LinphoneChatRoom *to_insert, LinphoneChatRo
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *kCellId = @"UIChatCell";
UIChatCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellId];
if (cell == nil) {
if (cell == nil)
cell = [[UIChatCell alloc] initWithIdentifier:kCellId];
}
[cell setChatRoom:(LinphoneChatRoom *)bctbx_list_nth_data(_data, (int)[indexPath row])];
[super accessoryForCell:cell atPath:indexPath];

View file

@ -88,14 +88,12 @@
NSString *text = [[FastAddressBook displayNameForAddress:linphone_chat_message_get_from_address(last_msg)]
stringByAppendingFormat:@" : %@", [UIChatBubbleTextCell TextMessageForChat:last_msg]];
// shorten long messages
if ([text length] > 50) {
if ([text length] > 50)
text = [[text substringToIndex:50] stringByAppendingString:@"[...]"];
}
_chatContentLabel.text = text;
} else {
} else
_chatContentLabel.text = nil;
_chatLatestTimeLabel.text = NSLocalizedString(@"Now", nil);
}
[self updateUnreadBadge];
}