Allow users to set padding between message and avatar
We currently have a fileprivate property on MessagesCollectionViewFlowLayout setting the default padding between the AvatarView and the MessageContainer to 4 pts.
In the layout calculations, I only apply the padding if the AvatarView has a width greater than zero.
We also have a property messageEdgeToView padding which allows you to limit the max width of a message based on whether that message is an incoming or outgoing message.
It may be better to refactor these properties into:
messageContainerLeadingPadding & messageContainerTrailingPadding
This would also allow the user to set the padding on an edge in the case where an AvatarView doesn't exist. For example, if the user wanted to stack bubbles and only have an AvatarView on the top most cell.
Allow users to set padding between message and avatar
We currently have a
fileprivateproperty onMessagesCollectionViewFlowLayoutsetting the default padding between theAvatarViewand theMessageContainerto4 pts.In the layout calculations, I only apply the padding if the
AvatarViewhas a width greater than zero.We also have a property
messageEdgeToViewpadding which allows you to limit the max width of a message based on whether that message is an incoming or outgoing message.It may be better to refactor these properties into:
messageContainerLeadingPadding&messageContainerTrailingPaddingThis would also allow the user to set the padding on an edge in the case where an
AvatarViewdoesn't exist. For example, if the user wanted to stack bubbles and only have anAvatarViewon the top most cell.