Watch
1
0
Fork
You've already forked nexus
0
forked from Nexus/nexus

allow banning left users

This commit is contained in:
Henry Hiles 2026-09-09 15:26:04 -04:00
commit 0201f71e5d
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -200,36 +200,35 @@ final class const UserBottomSheet(
), ),
if (ref.watch( if (ref.watch(
PowerLevelController.provider( PowerLevelController.provider(
.membershipAction( .membershipAction(
action: .kick, action: .kick,
roomId: roomId!, roomId: roomId!,
targetUser: userId, targetUser: userId,
), ),
), ),
) && ))
member.status == .join ||
member.status == .invite)
Padding( Padding(
padding: .only(top: 4), padding: .only(top: 4),
child: Row( child: Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
spacing: 8, spacing: 8,
children: [ children: [
M3EButton.icon( if (member.status == .join || member.status == .invite)
onPressed: () => showMembershipDialog(.kick), M3EButton.icon(
shape: .square, onPressed: () => showMembershipDialog(.kick),
icon: Icon(Icons.sports_martial_arts), shape: .square,
label: Text("Kick"), icon: Icon(Icons.sports_martial_arts),
decoration: .new( label: Text("Kick"),
backgroundColor: WidgetStatePropertyAll( decoration: .new(
theme.colorScheme.error, backgroundColor: WidgetStatePropertyAll(
), theme.colorScheme.error,
foregroundColor: WidgetStatePropertyAll( ),
theme.colorScheme.onError, foregroundColor: WidgetStatePropertyAll(
theme.colorScheme.onError,
),
), ),
), ),
),
M3EButton.icon( M3EButton.icon(
onPressed: () => showMembershipDialog(.ban), onPressed: () => showMembershipDialog(.ban),