Chat list: Tweak fonts/colours to match other messaging app styles

One difference is that we're using bold text to indicate unread messages in a conversation. Other apps have a badge instead.
This commit is contained in:
Matthew Wild 2024-02-26 13:18:34 +00:00
parent 14b2d7118e
commit 9a409c6ab0

View File

@ -98,7 +98,7 @@ class ChatsListViewController: UITableViewController {
let cellIdentifier = "ChatsListTableViewCellNew";
let cell = tableView.dequeueReusableCell(withIdentifier: cellIdentifier, for: indexPath as IndexPath) as! ChatsListTableViewCell;
let titleFontDescriptor = UIFontDescriptor.preferredFontDescriptor(withTextStyle: .title2)
let titleFontDescriptor = UIFontDescriptor.preferredFontDescriptor(withTextStyle: .title3)
let titleFontRead = UIFont(descriptor: titleFontDescriptor, size: 0.0)
let titleFontUnread = UIFont(descriptor: titleFontDescriptor.withSymbolicTraits(.traitBold)!, size: 0.0)
let messageFontDescriptor = UIFontDescriptor.preferredFontDescriptor(withTextStyle: .body)
@ -152,6 +152,7 @@ class ChatsListViewController: UITableViewController {
cell.lastMessageLabel.attributedText = msg;
}
}
cell.lastMessageLabel.textColor = .gray;
case .invitation(_, _, let sender):
if let fieldfont = cell.lastMessageLabel.font {
let font = UIFont(descriptor: messageFontDescriptor.withSymbolicTraits([.traitItalic, .traitBold, .traitCondensed])!, size: 0.0);