mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 01:05:17 +00:00
chore: Follow up change own power level
This commit is contained in:
parent
2a4fd6927c
commit
1f12b72271
2 changed files with 5 additions and 2 deletions
|
@ -299,7 +299,10 @@ class UserBottomSheetView extends StatelessWidget {
|
|||
BorderRadius.circular(AppConfig.borderRadius / 2),
|
||||
color: Theme.of(context).colorScheme.onInverseSurface,
|
||||
child: DropdownButton<int>(
|
||||
onChanged: user.canChangePowerLevel
|
||||
onChanged: user.canChangePowerLevel ||
|
||||
// Workaround until https://github.com/famedly/matrix-dart-sdk/pull/1765
|
||||
(user.room.canChangePowerLevel &&
|
||||
user.id == user.room.client.userID)
|
||||
? controller.setPowerLevel
|
||||
: null,
|
||||
value: {0, 50, 100}.contains(user.powerLevel)
|
||||
|
|
|
@ -21,7 +21,7 @@ Future<int?> showPermissionChooser(
|
|||
return L10n.of(context)!.pleaseEnterANumber;
|
||||
}
|
||||
final level = int.tryParse(text);
|
||||
if (level == null || level < 0) {
|
||||
if (level == null) {
|
||||
return L10n.of(context)!.pleaseEnterANumber;
|
||||
}
|
||||
return null;
|
||||
|
|
Loading…
Reference in a new issue