fix: Set avatar on only single action available

This commit is contained in:
Christian Pauly 2022-07-01 11:53:41 +02:00
parent c712644d64
commit 6d4588fc3c
2 changed files with 2 additions and 2 deletions

View File

@ -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,

View File

@ -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,