Merge pull request #596 from mastodon/improve_post_media_inline_appearance

Improve media inline appearance
This commit is contained in:
Nathan Mattes 2022-11-15 19:49:18 +01:00 committed by GitHub
commit 7e04dd3d31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -222,13 +222,17 @@ extension ComposeContentView {
VStack(spacing: 16) {
ForEach(viewModel.attachmentViewModels, id: \.self) { attachmentViewModel in
AttachmentView(viewModel: attachmentViewModel)
.clipShape(Rectangle())
.clipShape(RoundedRectangle(cornerRadius: 4))
.badgeView(
Button {
viewModel.attachmentViewModels.removeAll(where: { $0 === attachmentViewModel })
} label: {
Image(systemName: "minus.circle.fill")
.resizable()
.frame(width: 20, height: 20)
.foregroundColor(.red)
.background(Color.white)
.clipShape(Circle())
}
)
} // end ForEach