Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow users to set padding between message and avatar #201

Closed
SD10 opened this issue Oct 1, 2017 · 0 comments
Closed

Allow users to set padding between message and avatar #201

SD10 opened this issue Oct 1, 2017 · 0 comments
Assignees
Milestone

Comments

@SD10
Copy link
Member

SD10 commented Oct 1, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant