chore: account for selection buttons height in overlay positioning (#2653)

This commit is contained in:
ggurdin 2025-05-05 12:05:32 -04:00 committed by GitHub
parent b2a0435380
commit 65a3425dd9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -422,7 +422,8 @@ class MessageSelectionPositionerState extends State<MessageSelectionPositioner>
double newBottomOffset = _mediaQuery!.size.height -
_originalMessageOffset.dy +
difference -
_originalMessageSize.height;
_originalMessageSize.height -
_selectionButtonsHeight;
if (newBottomOffset < _footerHeight + AppConfig.toolbarSpacing) {
newBottomOffset = _footerHeight + AppConfig.toolbarSpacing;
@ -609,7 +610,8 @@ class MessageSelectionPositionerState extends State<MessageSelectionPositioner>
maxHeight: _mediaQuery!.size.height -
_headerHeight -
_footerHeight -
AppConfig.toolbarSpacing * 2,
AppConfig.toolbarSpacing * 2 -
_selectionButtonsHeight,
readingAssistanceMode: _readingAssistanceMode,
),
),
@ -682,7 +684,8 @@ class MessageSelectionPositionerState extends State<MessageSelectionPositioner>
maxHeight: _mediaQuery!.size.height -
_headerHeight -
_footerHeight -
AppConfig.toolbarSpacing * 2,
AppConfig.toolbarSpacing * 2 -
_selectionButtonsHeight,
readingAssistanceMode: _readingAssistanceMode,
),
if (showSelectionButtons)