Fix compose reply avatar being wrongly aligned for 1-line statuses

This commit is contained in:
Shadowfacts 2022-11-03 19:14:52 -04:00
parent f5953655c5
commit bfdce07d81
1 changed files with 2 additions and 1 deletions

View File

@ -51,6 +51,7 @@ struct ComposeReplyView: View {
.frame(height: contentHeight ?? 0)
}
}
.frame(minHeight: 50, alignment: .top)
}
private func replyAvatarImage(geometry: GeometryProxy) -> some View {
@ -63,7 +64,7 @@ struct ComposeReplyView: View {
offset = max(offset, 0)
// subtract 50, because we care about where the bottom of the view is but the offset is relative to the top of the view
let maxOffset = (contentHeight ?? 0) + (displayNameHeight ?? 0) - 50
let maxOffset = max((contentHeight ?? 0) + (displayNameHeight ?? 0) - 50, 0)
// once you scroll past the in-reply-to-content, the bottom of the avatar should be pinned to the bottom of the content
offset = min(offset, maxOffset)