From 0651b5c1f19af7efc40807aecd77be6080504adf Mon Sep 17 00:00:00 2001 From: krille-chan Date: Sat, 23 Dec 2023 09:52:55 +0100 Subject: [PATCH] fix: Join public rooms --- lib/widgets/public_room_bottom_sheet.dart | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/widgets/public_room_bottom_sheet.dart b/lib/widgets/public_room_bottom_sheet.dart index cfe21c5e..ddb22f56 100644 --- a/lib/widgets/public_room_bottom_sheet.dart +++ b/lib/widgets/public_room_bottom_sheet.dart @@ -28,9 +28,8 @@ class PublicRoomBottomSheet extends StatelessWidget { } void _joinRoom(BuildContext context) async { - final client = Matrix.of(context).client; + final client = Matrix.of(outerContext).client; final chunk = this.chunk; - final navigator = Navigator.of(context); final result = await showFutureLoadingDialog( context: context, future: () async { @@ -50,10 +49,10 @@ class PublicRoomBottomSheet extends StatelessWidget { }, ); if (result.error == null) { - navigator.pop(); + Navigator.of(context).pop(); // don't open the room if the joined room is a space if (!client.getRoomById(result.result!)!.isSpace) { - context.go('/rooms/${result.result!}'); + outerContext.go('/rooms/${result.result!}'); } return; }