chore: account for top screen padding when adjusting overlay position on header overflow (#3647)

This commit is contained in:
ggurdin 2025-08-07 09:55:26 -04:00 committed by GitHub
parent d083e53d47
commit 3ca759229b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -339,8 +339,12 @@ class MessageSelectionPositionerState extends State<MessageSelectionPositioner>
double boxHeight =
screenHeight - _originalMessageOffset.dy - originalContentHeight;
if (boxHeight + _fullContentHeight > screenHeight) {
boxHeight = screenHeight - _fullContentHeight - 8.0;
final neededSpace =
boxHeight + _fullContentHeight + mediaQuery!.padding.top;
if (neededSpace > screenHeight) {
boxHeight =
screenHeight - _fullContentHeight - mediaQuery!.padding.top - 4.0;
}
return boxHeight;