Skip to content

Commit

Permalink
Merge pull request #741 from krille-chan/krille/fix-join-public-room
Browse files Browse the repository at this point in the history
fix: Join public rooms
  • Loading branch information
krille-chan authored Dec 23, 2023
2 parents 3b0c06b + 0651b5c commit 52ee1fc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/widgets/public_room_bottom_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>(
context: context,
future: () async {
Expand All @@ -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;
}
Expand Down

0 comments on commit 52ee1fc

Please sign in to comment.