TF-2666 Edit one recipient in To/Cc/Bcc on web

Signed-off-by: dab246 <tdvu@linagora.com>
This commit is contained in:
dab246
2024-12-02 14:09:27 +07:00
committed by Dat H. Pham
parent 36c386bb90
commit 3b96eeeb20
9 changed files with 398 additions and 1 deletions
@@ -37,6 +37,12 @@ typedef OnFocusEmailAddressChangeAction = void Function(PrefixEmailAddress prefi
typedef OnRemoveDraggableEmailAddressAction = void Function(DraggableEmailAddress draggableEmailAddress);
typedef OnDeleteTagAction = void Function(EmailAddress emailAddress);
typedef OnEnableAllRecipientsInputAction = void Function(bool isEnabled);
typedef OnEditRecipientAction = void Function(
BuildContext context,
PrefixEmailAddress prefix,
EmailAddress emailAddress,
RelativeRect position,
);
class RecipientComposerWidget extends StatefulWidget {
@@ -62,6 +68,7 @@ class RecipientComposerWidget extends StatefulWidget {
final OnShowFullListEmailAddressAction? onShowFullListEmailAddressAction;
final OnFocusEmailAddressChangeAction? onFocusEmailAddressChangeAction;
final OnRemoveDraggableEmailAddressAction? onRemoveDraggableEmailAddressAction;
final OnEditRecipientAction? onEditRecipientAction;
final VoidCallback? onFocusNextAddressAction;
final EdgeInsetsGeometry? padding;
final EdgeInsetsGeometry? margin;
@@ -101,6 +108,7 @@ class RecipientComposerWidget extends StatefulWidget {
this.onRemoveDraggableEmailAddressAction,
this.onEnableAllRecipientsInputAction,
this.focusNodeKeyboard,
this.onEditRecipientAction,
});
@override
@@ -217,6 +225,7 @@ class _RecipientComposerWidgetState extends State<RecipientComposerWidget> {
maxWidth: widget.maxWidth,
onDeleteTagAction: (emailAddress) => _handleDeleteTagAction.call(emailAddress, stateSetter),
onShowFullAction: widget.onShowFullListEmailAddressAction,
onEditRecipientAction: widget.onEditRecipientAction,
);
},
onTagChanged: (value) => _handleOnTagChangeAction.call(value, stateSetter),
@@ -309,6 +318,7 @@ class _RecipientComposerWidgetState extends State<RecipientComposerWidget> {
maxWidth: widget.maxWidth,
onDeleteTagAction: (emailAddress) => _handleDeleteTagAction.call(emailAddress, stateSetter),
onShowFullAction: widget.onShowFullListEmailAddressAction,
onEditRecipientAction: widget.onEditRecipientAction,
);
},
onTagChanged: (value) => _handleOnTagChangeAction.call(value, stateSetter),