From 4818d094af83322e2b23dec37383626d4630bda9 Mon Sep 17 00:00:00 2001 From: Leandro Borges Ferreira Date: Sun, 26 Feb 2023 17:53:22 +0100 Subject: [PATCH] Fixing modal in the middle for big messages in landscape --- .../lib/src/message_widget/reactions/reactions_align.dart | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/stream_chat_flutter/lib/src/message_widget/reactions/reactions_align.dart b/packages/stream_chat_flutter/lib/src/message_widget/reactions/reactions_align.dart index ec149718..da63f589 100644 --- a/packages/stream_chat_flutter/lib/src/message_widget/reactions/reactions_align.dart +++ b/packages/stream_chat_flutter/lib/src/message_widget/reactions/reactions_align.dart @@ -108,19 +108,18 @@ double _landScapeAlign( offset necessary for the position of reaction look the best way possible. */ - const constant = 3000; if (isAttachment) { result = 0; } else if (user?.id == message.user?.id) { - if (divFactor >= 1.0) { + if (divFactor >= 1.3) { result = 0; } else { // Small messages, it is simpler to align then. result = 1 - divFactor * 0.6; } } else { - if (divFactor >= 1.0) { - result = shiftFactor + maxWidth / constant; + if (divFactor >= 1.3) { + result = 0; } else { result = -(1 - divFactor * 0.6); }