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:
parent
d5daec3e6c
commit
0b3ed17c63
1 changed files with 5 additions and 5 deletions
|
|
@ -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(_) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue