             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

                right: 10)
        }

        
        // Always update date and state
        dateText.textLayout = self.cellLayout.dateLayout
        
        messageState = message.messageState.ordinal()
        

        // Always update bubble insets
        if (isOut) {
            bindBubbleType(.TextOut, isCompact: isClanchBottom)
            
            bubbleInsets = UIEdgeInsets(
                top: (isClanchTop ? AABubbleCell.bubbleTopCompact : AABubbleCell.bubbleTop),
