     let layout = IMUIMessageCellLayout(isOutGoingMessage: isOutGoing,
                                        isNeedShowTime: false,
                                        bubbleContentSize: MyMessageModel.calculateTextContentSize(text: text),
-                                       bubbleContentInset: UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10))
+                                       bubbleContentInset: MyMessageModel.bubbleContentInset(isOutGoing: isOutGoing))
     let myLayout = MyMessageCellLayout(defaultLayout: layout)
     
     self.init(msgId: "", fromUser: MyUser(), isOutGoing: isOutGoing, date: Date(), status: .success, type: .text, text: text, mediaPath: "", layout:  myLayout)

    
    return textSize
  }
}



  }
  
  var bubbleContentInset: UIEdgeInsets {
    return defaultLayout.bubbleContentInset
  }
  
}


