Created
September 20, 2019 06:53
-
-
Save d-srd/86356f9137c88bab2ef2e084ac677391 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GeometryReader { geometry in | |
ForEach(self.messages) { message in | |
MessageView(message: message) | |
.padding(.horizontal, 8) | |
.padding(EdgeInsets( | |
top: 0, | |
leading: message.sender == .me ? geometry.size.width * 0.5 : 0 , | |
bottom: 0, | |
trailing: message.sender == .me ? 0 : geometry.size.width * 0.5)) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment