Merge branch 'main' into merge

This commit is contained in:
ggurdin 2024-09-11 15:28:44 -04:00
commit 2001e51171
No known key found for this signature in database
GPG key ID: A01CB41737CBB478
2 changed files with 16 additions and 2 deletions

View file

@ -1602,6 +1602,13 @@ class ChatController extends State<ChatPageWithRoom>
Event? nextEvent,
Event? prevEvent,
}) {
if (![
MessageTypes.Text,
MessageTypes.Audio,
].contains(pangeaMessageEvent.event.messageType)) {
return;
}
// Close keyboard, if open
if (inputFocus.hasFocus && PlatformInfos.isMobile) {
inputFocus.unfocus();

View file

@ -74,13 +74,20 @@ class MessageSelectionOverlayState extends State<MessageSelectionOverlay>
double scrollOffset = 0;
double animationEndOffset = 0;
final midpoint = (headerBottomOffset + footerBottomOffset) / 2;
if (hasHeaderOverflow) {
final midpoint = (headerBottomOffset + footerBottomOffset) / 2;
animationEndOffset = midpoint - messageSize!.height;
scrollOffset = animationEndOffset - currentBottomOffset;
} else if (hasFooterOverflow) {
scrollOffset = footerHeight - currentBottomOffset;
animationEndOffset = currentBottomOffset + scrollOffset;
animationEndOffset = footerHeight;
final bottomOffsetDifference = footerHeight - currentBottomOffset;
final newTopOffset = messageOffset!.dy - bottomOffsetDifference;
if (newTopOffset < (headerHeight + AppConfig.toolbarMaxHeight)) {
animationEndOffset = midpoint - messageSize!.height;
scrollOffset = animationEndOffset - currentBottomOffset;
}
}
_overlayPositionAnimation = Tween<double>(