chore: Follow up knock room

This commit is contained in:
krille-chan 2024-04-14 16:29:11 +02:00
parent 45e72428e2
commit 4353c8ddd1
No known key found for this signature in database

View file

@ -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