Skip to content

Commit

Permalink
Merge branch 'MAILWEB-4771-expiration-time-draft' into 'main'
Browse files Browse the repository at this point in the history
Update draft expiration time in store when deletion occurs

See merge request web/clients!8376

Changelog:
  • Loading branch information
MargeBot committed Dec 21, 2023
2 parents dc51488 + 924c451 commit f09a254
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -33,6 +36,7 @@ const ComposerMoreActions = ({
editorMetadata,
onChange,
}: Props) => {
const dispatch = useAppDispatch();
const titleMoreOptions = c('Title').t`More options`;

const toolbarExtension = useMemo(
Expand All @@ -50,6 +54,7 @@ const ComposerMoreActions = ({

const handleRemoveExpiration = () => {
onChange({ draftFlags: { expiresIn: undefined } });
dispatch(updateExpires({ ID: message?.localID || '', expiresIn: undefined }));
};

return (
Expand Down

0 comments on commit f09a254

Please sign in to comment.