diff --git a/applications/mail/src/app/components/composer/actions/ComposerMoreActions.tsx b/applications/mail/src/app/components/composer/actions/ComposerMoreActions.tsx index ab382a4e56a..deb90e2ac5e 100644 --- a/applications/mail/src/app/components/composer/actions/ComposerMoreActions.tsx +++ b/applications/mail/src/app/components/composer/actions/ComposerMoreActions.tsx @@ -6,6 +6,9 @@ import { EditorMetadata, Icon } from '@proton/components'; import DropdownMenuButton from '@proton/components/components/dropdown/DropdownMenuButton'; import clsx from '@proton/utils/clsx'; +import { updateExpires } from 'proton-mail/logic/messages/draft/messagesDraftActions'; +import { useAppDispatch } from 'proton-mail/logic/store'; + import { MessageState } from '../../../logic/messages/messagesTypes'; import { MessageChange, MessageChangeFlag } from '../Composer'; import { ExternalEditorActions } from '../editor/EditorWrapper'; @@ -33,6 +36,7 @@ const ComposerMoreActions = ({ editorMetadata, onChange, }: Props) => { + const dispatch = useAppDispatch(); const titleMoreOptions = c('Title').t`More options`; const toolbarExtension = useMemo( @@ -50,6 +54,7 @@ const ComposerMoreActions = ({ const handleRemoveExpiration = () => { onChange({ draftFlags: { expiresIn: undefined } }); + dispatch(updateExpires({ ID: message?.localID || '', expiresIn: undefined })); }; return (