Fix spoiler image content alignment (#1177)

Fixed an issue where the alignment of the spoiler button and the spoiler image is split left and right when the image size is set to compact.

Co-authored-by: Yusuke Arakawa <nekolaboratory@users.noreply.github.com>
This commit is contained in:
Yusuke Arakawa 2023-03-07 15:05:20 +09:00 committed by GitHub
parent eaaa8cd1c9
commit 62fd7bae12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -149,7 +149,7 @@ public struct StatusRowMediaPreviewView: View {
@ViewBuilder
private func makeFeaturedImagePreview(attachment: MediaAttachment) -> some View {
ZStack(alignment: .bottomTrailing) {
ZStack(alignment: .bottomLeading) {
let size: CGSize = size(for: attachment) ?? .init(width: imageMaxHeight, height: imageMaxHeight)
let newSize = imageSize(from: size, newWidth: availableWidth - appLayoutWidth)
switch attachment.supportedType {