chore: don't show message overlay if not on chat page (#2683)

This commit is contained in:
ggurdin 2025-05-06 10:25:19 -04:00 committed by GitHub
parent bfe8766dd1
commit 61ba232195
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1911,6 +1911,12 @@ class ChatController extends State<ChatPageWithRoom>
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!,