             attrDate.yy_font = AABubbleTextCell.dateFont
             attrDate.yy_color = ActorSDK.sharedActor().style.chatTextDateOutColor
             dateLayout = YYTextLayout(containerSize: CGSizeMake(timeWidth, CGFloat.max), text: attrDate)
+            dateWidth = dateLayout?.textBoundingSize.width
         } else {
             let attrDate = NSMutableAttributedString(string: AACellLayout.formatDate(date))
             attrDate.yy_font = AABubbleTextCell.dateFont
             attrDate.yy_color = ActorSDK.sharedActor().style.chatTextDateInColor
             dateLayout = YYTextLayout(containerSize: CGSizeMake(timeWidth, CGFloat.max), text: attrDate)
+            dateWidth = dateLayout?.textBoundingSize.width
         }
         
         // Calculating bubble height

    var textLayout: YYTextLayout
    var senderLayout: YYTextLayout?
    var dateLayout: YYTextLayout?
    
    var isUnsupported: Bool = false
    var bubbleSize: CGSize

                right: 10)
        }

        dateText.textLayout = self.cellLayout.dateLayout
        dateWidth = self.cellLayout.dateWidth!
        
        messageState = message.messageState.ordinal()
        
