瀏覽代碼

don't show own sender name in chat messages

cyberta 4 年之前
父節點
當前提交
afc7d11b9e
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      deltachat-ios/Chat/Views/Cells/BaseMessageCell.swift

+ 2 - 1
deltachat-ios/Chat/Views/Cells/BaseMessageCell.swift

@@ -113,16 +113,17 @@ public class BaseMessageCell: UITableViewCell {
 
     // update classes inheriting BaseMessageCell first before calling super.update(...)
     func update(msg: DcMsg, messageStyle: UIRectCorner, isAvatarVisible: Bool) {
-        topLabel.text = msg.fromContact.displayName
 
         if msg.isFromCurrentSender {
             self.leadingConstraintCurrentSender?.isActive = true
             self.trailingConstraintCurrentSender?.isActive = true
+            topLabel.text = nil
             bottomSpacerConstraint?.isActive = true
 
         } else {
             self.leadingConstraint?.isActive = true
             self.trailingConstraint?.isActive = true
+            topLabel.text = msg.fromContact.displayName
             bottomSpacerConstraint?.isActive = false
 
         }