chore: don't show message overlay if not on chat page (#2683)
This commit is contained in:
parent
bfe8766dd1
commit
61ba232195
1 changed files with 6 additions and 0 deletions
|
|
@ -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!,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue