Skip to content

Commit 8b02992

Browse files
Improved display of reactions overlay on large messages
1 parent 2b6adc7 commit 8b02992

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/StreamChatSwiftUI/ChatChannel/Reactions/ReactionsOverlayView.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public struct ReactionsOverlayView<Factory: ViewFactory>: View {
7373
)
7474
.offset(
7575
x: paddingValue / 2,
76-
y: originY + messageDisplayInfo.frame.height - paddingValue + 2
76+
y: originY + messageContainerHeight - paddingValue + 2
7777
)
7878
}
7979

@@ -105,7 +105,7 @@ public struct ReactionsOverlayView<Factory: ViewFactory>: View {
105105
.animation(popInAnimation, value: popIn)
106106
.offset(
107107
x: messageDisplayInfo.frame.origin.x - diffWidth,
108-
y: popIn ? -24 : -messageDisplayInfo.frame.height / 2
108+
y: popIn ? -24 : -messageContainerHeight / 2
109109
)
110110
: nil
111111
)
@@ -194,7 +194,7 @@ public struct ReactionsOverlayView<Factory: ViewFactory>: View {
194194
var originY = messageDisplayInfo.frame.origin.y
195195
let screenHeight = UIScreen.main.bounds.size.height
196196
let minOrigin: CGFloat = 100
197-
let maxOrigin: CGFloat = screenHeight - messageDisplayInfo.frame.height - bottomPopupOffset - minOrigin
197+
let maxOrigin: CGFloat = screenHeight - messageContainerHeight - bottomPopupOffset - minOrigin
198198
if originY < minOrigin {
199199
originY = minOrigin
200200
} else if originY > maxOrigin {

0 commit comments

Comments
 (0)