Explorar el Código

day marker font should be bold

cyberta hace 3 años
padre
commit
a54ded0c51

+ 1 - 1
deltachat-ios/Chat/ChatViewController.swift

@@ -660,7 +660,7 @@ class ChatViewController: UITableViewController {
                 }
 
                 let nextMessage = dcContext.getMessage(id: nextMessageId)
-                cell.update(text: DateUtils.getDateString(date: nextMessage.sentDate))
+                cell.update(text: DateUtils.getDateString(date: nextMessage.sentDate), weight: .bold)
             } else {
                 cell.update(text: "ErrDaymarker")
             }

+ 6 - 2
deltachat-ios/Chat/Views/Cells/InfoMessageCell.swift

@@ -18,7 +18,6 @@ class InfoMessageCell: UITableViewCell {
         label.numberOfLines = 0
         label.lineBreakMode = .byWordWrapping
         label.textAlignment = .center
-        label.font = UIFont.preferredFont(for: .subheadline, weight: .medium)
         label.textColor = DcColors.systemMessageFontColor
         return label
     }()
@@ -52,8 +51,13 @@ class InfoMessageCell: UITableViewCell {
         selectionStyle = .none
     }
 
-    func update(text: String?) {
+    func update(text: String?, weight: UIFont.Weight? = nil) {
         messageLabel.text = text
+        if let weight = weight {
+            messageLabel.font = UIFont.preferredFont(for: .subheadline, weight: weight)
+        } else {
+            messageLabel.font =  UIFont.preferredFont(for: .subheadline, weight: .medium)
+        }
         var corners: UIRectCorner = []
         corners.formUnion(.topLeft)
         corners.formUnion(.bottomLeft)