fix: Set avatar on only single action available

krille/design-adjust
Christian Pauly 3 years ago
parent b671ae331d
commit df30adb724

@ -280,7 +280,7 @@ class ChatDetailsController extends State<ChatDetails> {
), ),
]; ];
final action = actions.length == 1 final action = actions.length == 1
? actions.single ? actions.single.key
: await showModalActionSheet<AvatarAction>( : await showModalActionSheet<AvatarAction>(
context: context, context: context,
title: L10n.of(context)!.editRoomAvatar, title: L10n.of(context)!.editRoomAvatar,

@ -57,7 +57,7 @@ class SettingsController extends State<Settings> {
), ),
]; ];
final action = actions.length == 1 final action = actions.length == 1
? actions.single ? actions.single.key
: await showModalActionSheet<AvatarAction>( : await showModalActionSheet<AvatarAction>(
context: context, context: context,
title: L10n.of(context)!.changeYourAvatar, title: L10n.of(context)!.changeYourAvatar,

Loading…
Cancel
Save