Skip to content

Commit 43b74e0

Browse files
Fixed reactions picker for large messages sometimes goes in the safe area (#459)
1 parent f9a8529 commit 43b74e0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
33

44
# Upcoming
55

6-
### 🔄 Changed
6+
### 🐞 Fixed
7+
- Reactions picker for large messages sometimes goes in the safe area
78

89
# [4.50.1](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.50.1)
910
_March 14, 2024_

Sources/StreamChatSwiftUI/ChatChannel/Reactions/ReactionsOverlayView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ public struct ReactionsOverlayView<Factory: ViewFactory>: View {
258258
}
259259

260260
private var messageContainerHeight: CGFloat {
261-
let maxAllowed = screenHeight / 2
261+
let maxAllowed = screenHeight / 2 - topSafeArea
262262
let containerHeight = messageDisplayInfo.frame.height
263263
return containerHeight > maxAllowed ? maxAllowed : containerHeight
264264
}
@@ -281,7 +281,7 @@ public struct ReactionsOverlayView<Factory: ViewFactory>: View {
281281
messageDisplayInfo.showsMessageActions ? messageActionsSize : userReactionsPopupHeight
282282
var originY = messageDisplayInfo.frame.origin.y
283283
let minOrigin: CGFloat = 100
284-
let maxOrigin: CGFloat = screenHeight - messageContainerHeight - bottomPopupOffset - minOrigin - bottomOffset
284+
let maxOrigin: CGFloat = screenHeight + topSafeArea - messageContainerHeight - bottomPopupOffset - minOrigin - bottomOffset
285285
if originY < minOrigin {
286286
originY = minOrigin
287287
} else if originY > maxOrigin {

0 commit comments

Comments
 (0)