fix: don't show option to join with code if space is public (#1583)

This commit is contained in:
ggurdin 2025-01-24 16:42:25 -05:00 committed by GitHub
parent 0622bf6f07
commit 0519ae41e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -230,7 +230,9 @@ class PublicRoomBottomSheetState extends State<PublicRoomBottomSheet> {
],
),
// #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<PublicRoomBottomSheet> {
),
),
),
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<PublicRoomBottomSheet> {
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(