Fix scrollable overlay (#3596)

* chore: fix overlay misalignment for messages without reactions

* chore: fix scrolling for some messages that don't fill screen
This commit is contained in:
ggurdin 2025-07-31 10:43:14 -04:00 committed by GitHub
parent d5daec3e6c
commit 0b3ed17c63
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -153,7 +153,7 @@ class MessageSelectionPositionerState extends State<MessageSelectionPositioner>
double get reactionsHeight {
if (_reactionsRenderBox != null) {
return _reactionsRenderBox!.size.height + 4.0;
return _reactionsRenderBox!.size.height;
}
return hasReactions ? 28.0 : 0.0;
}
@ -332,18 +332,18 @@ class MessageSelectionPositionerState extends State<MessageSelectionPositioner>
final messageHeight = originalMessageSize.height;
final originalContentHeight =
messageHeight + reactionsHeight + AppConfig.toolbarMenuHeight + 4.0;
messageHeight + reactionsHeight + AppConfig.toolbarMenuHeight + 8.0;
final screenHeight = mediaQuery!.size.height - mediaQuery!.padding.bottom;
final boxHeight =
double boxHeight =
screenHeight - _originalMessageOffset.dy - originalContentHeight;
if (boxHeight + _fullContentHeight > screenHeight) {
return screenHeight - _fullContentHeight;
boxHeight = screenHeight - _fullContentHeight - 8.0;
}
return screenHeight - _originalMessageOffset.dy - originalContentHeight;
return boxHeight;
}
void _onContentSizeChanged(_) {