From 4353c8ddd13f9ae80da5ad84ecbc0c6eeee773bd Mon Sep 17 00:00:00 2001 From: krille-chan Date: Sun, 14 Apr 2024 16:29:11 +0200 Subject: [PATCH] chore: Follow up knock room --- lib/widgets/public_room_bottom_sheet.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/widgets/public_room_bottom_sheet.dart b/lib/widgets/public_room_bottom_sheet.dart index 7871bc903..3a4f68f3f 100644 --- a/lib/widgets/public_room_bottom_sheet.dart +++ b/lib/widgets/public_room_bottom_sheet.dart @@ -142,7 +142,11 @@ class PublicRoomBottomSheet extends StatelessWidget { child: ElevatedButton.icon( onPressed: () => _joinRoom(context), label: Text( - chunk?.joinRule == 'knock' + chunk?.joinRule == 'knock' && + Matrix.of(context) + .client + .getRoomById(chunk!.roomId) == + null ? L10n.of(context)!.knock : chunk?.roomType == 'm.space' ? L10n.of(context)!.joinSpace