mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-17 08:55:12 +00:00
Merge pull request #741 from krille-chan/krille/fix-join-public-room
fix: Join public rooms
This commit is contained in:
commit
52ee1fc891
1 changed files with 3 additions and 4 deletions
|
@ -28,9 +28,8 @@ class PublicRoomBottomSheet extends StatelessWidget {
|
||||||
}
|
}
|
||||||
|
|
||||||
void _joinRoom(BuildContext context) async {
|
void _joinRoom(BuildContext context) async {
|
||||||
final client = Matrix.of(context).client;
|
final client = Matrix.of(outerContext).client;
|
||||||
final chunk = this.chunk;
|
final chunk = this.chunk;
|
||||||
final navigator = Navigator.of(context);
|
|
||||||
final result = await showFutureLoadingDialog<String>(
|
final result = await showFutureLoadingDialog<String>(
|
||||||
context: context,
|
context: context,
|
||||||
future: () async {
|
future: () async {
|
||||||
|
@ -50,10 +49,10 @@ class PublicRoomBottomSheet extends StatelessWidget {
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
if (result.error == null) {
|
if (result.error == null) {
|
||||||
navigator.pop();
|
Navigator.of(context).pop();
|
||||||
// don't open the room if the joined room is a space
|
// don't open the room if the joined room is a space
|
||||||
if (!client.getRoomById(result.result!)!.isSpace) {
|
if (!client.getRoomById(result.result!)!.isSpace) {
|
||||||
context.go('/rooms/${result.result!}');
|
outerContext.go('/rooms/${result.result!}');
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue