Przeglądaj źródła

don't show own sender name in chat messages

cyberta 4 lat temu
rodzic
commit
84263c4f23

+ 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
 
         }