From 61ba232195fac719f4723f77f600c573cb7ee921 Mon Sep 17 00:00:00 2001 From: ggurdin <46800240+ggurdin@users.noreply.github.com> Date: Tue, 6 May 2025 10:25:19 -0400 Subject: [PATCH] chore: don't show message overlay if not on chat page (#2683) --- lib/pages/chat/chat.dart | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/pages/chat/chat.dart b/lib/pages/chat/chat.dart index c5e41c8c1..9951cdbbf 100644 --- a/lib/pages/chat/chat.dart +++ b/lib/pages/chat/chat.dart @@ -1911,6 +1911,12 @@ class ChatController extends State Future.delayed( Duration(milliseconds: buttonEventID == event.eventId ? 200 : 0), () { + if (_router.state.path != ':roomid') { + // The user has navigated away from the chat, + // so we don't want to show the overlay. + return; + } + OverlayUtil.showOverlay( context: context, child: overlayEntry!,