Merge branch 'merge' into merge-analytics

pull/1384/head
ggurdin 1 year ago
commit 0124ce6d24
No known key found for this signature in database
GPG Key ID: A01CB41737CBB478

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

@ -74,13 +74,20 @@ class MessageSelectionOverlayState extends State<MessageSelectionOverlay>
double scrollOffset = 0; double scrollOffset = 0;
double animationEndOffset = 0; double animationEndOffset = 0;
final midpoint = (headerBottomOffset + footerBottomOffset) / 2;
if (hasHeaderOverflow) { if (hasHeaderOverflow) {
final midpoint = (headerBottomOffset + footerBottomOffset) / 2;
animationEndOffset = midpoint - messageSize!.height; animationEndOffset = midpoint - messageSize!.height;
scrollOffset = animationEndOffset - currentBottomOffset; scrollOffset = animationEndOffset - currentBottomOffset;
} else if (hasFooterOverflow) { } else if (hasFooterOverflow) {
scrollOffset = footerHeight - currentBottomOffset; 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>( _overlayPositionAnimation = Tween<double>(

Loading…
Cancel
Save