forked from shadowfacts/Tusker
Fix compose reply avatar being wrongly aligned for 1-line statuses
This commit is contained in:
parent
f5953655c5
commit
bfdce07d81
|
@ -51,6 +51,7 @@ struct ComposeReplyView: View {
|
||||||
.frame(height: contentHeight ?? 0)
|
.frame(height: contentHeight ?? 0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.frame(minHeight: 50, alignment: .top)
|
||||||
}
|
}
|
||||||
|
|
||||||
private func replyAvatarImage(geometry: GeometryProxy) -> some View {
|
private func replyAvatarImage(geometry: GeometryProxy) -> some View {
|
||||||
|
@ -63,7 +64,7 @@ struct ComposeReplyView: View {
|
||||||
offset = max(offset, 0)
|
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
|
// 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
|
// 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)
|
offset = min(offset, maxOffset)
|
||||||
|
|
Loading…
Reference in New Issue