You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Allow users to set padding between message and avatar
We currently have a
fileprivate
property onMessagesCollectionViewFlowLayout
setting the default padding between theAvatarView
and theMessageContainer
to4 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 anAvatarView
on the top most cell.The text was updated successfully, but these errors were encountered: