fix: Permission chooser dialog on iOS
This commit is contained in:
parent
c237e1356f
commit
e7b851dda2
5 changed files with 66 additions and 204 deletions
|
|
@ -30,9 +30,10 @@ class ChatPermissionsSettingsController extends State<ChatPermissionsSettings> {
|
|||
SnackBar(content: Text(L10n.of(context)!.noPermission)));
|
||||
return;
|
||||
}
|
||||
final newLevel =
|
||||
await PermissionSliderDialog(initialPermission: currentLevel)
|
||||
.show(context);
|
||||
final newLevel = await showPermissionChooser(
|
||||
context,
|
||||
currentLevel: currentLevel,
|
||||
);
|
||||
if (newLevel == null) return;
|
||||
final content = Map<String, dynamic>.from(
|
||||
room.getState(EventTypes.RoomPowerLevels)!.content);
|
||||
|
|
|
|||
|
|
@ -115,9 +115,10 @@ class UserBottomSheetController extends State<UserBottomSheet> {
|
|||
}
|
||||
break;
|
||||
case 'permission':
|
||||
final newPermission = await PermissionSliderDialog(
|
||||
initialPermission: widget.user.powerLevel)
|
||||
.show(context);
|
||||
final newPermission = await showPermissionChooser(
|
||||
context,
|
||||
currentLevel: widget.user.powerLevel,
|
||||
);
|
||||
if (newPermission != null) {
|
||||
if (newPermission == 100 && await _askConfirmation() == false) break;
|
||||
await showFutureLoadingDialog(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue