From 0519ae41e1a18e57731a6b84dd0ca397e6bdaef7 Mon Sep 17 00:00:00 2001 From: ggurdin <46800240+ggurdin@users.noreply.github.com> Date: Fri, 24 Jan 2025 16:42:25 -0500 Subject: [PATCH] fix: don't show option to join with code if space is public (#1583) --- lib/widgets/public_room_bottom_sheet.dart | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/widgets/public_room_bottom_sheet.dart b/lib/widgets/public_room_bottom_sheet.dart index 2b90dd538..f4929b994 100644 --- a/lib/widgets/public_room_bottom_sheet.dart +++ b/lib/widgets/public_room_bottom_sheet.dart @@ -230,7 +230,9 @@ class PublicRoomBottomSheetState extends State { ], ), // #Pangea - if (!_isRoomMember && chunk?.roomType == 'm.space') + if (!_isRoomMember && + chunk?.roomType == 'm.space' && + chunk?.joinRule != 'public') Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), child: TextField( @@ -245,7 +247,9 @@ class PublicRoomBottomSheetState extends State { ), ), ), - if (!_isRoomMember && chunk?.roomType == 'm.space') + if (!_isRoomMember && + chunk?.roomType == 'm.space' && + chunk?.joinRule != 'public') Padding( padding: const EdgeInsets.symmetric( horizontal: 16.0, @@ -259,7 +263,9 @@ class PublicRoomBottomSheetState extends State { icon: const Icon(Icons.navigate_next), ), ), - if (!_isRoomMember && chunk?.roomType == 'm.space') + if (!_isRoomMember && + chunk?.roomType == 'm.space' && + chunk?.joinRule != 'public') Padding( padding: const EdgeInsets.symmetric(horizontal: 16.0), child: Row(