allow banning left users
This commit is contained in:
parent
4314c88d5c
commit
0201f71e5d
1 changed files with 21 additions and 22 deletions
|
|
@ -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),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue