From 37726a86d7229187b05612424438edceb53e162a Mon Sep 17 00:00:00 2001 From: Jess Robinson Date: Mon, 27 Jan 2025 16:43:40 +0000 Subject: [PATCH] fix(compose): Stop creating new draft copies after sending Fixes: #644 --- src/app/compose/compose.component.ts | 4 ++++ src/app/compose/draftdesk.component.ts | 1 - 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/compose/compose.component.ts b/src/app/compose/compose.component.ts index 129cdcc15..7a0deec90 100644 --- a/src/app/compose/compose.component.ts +++ b/src/app/compose/compose.component.ts @@ -877,6 +877,10 @@ export class ComposeComponent implements AfterViewInit, OnDestroy, OnInit { ngOnDestroy() { if (this.editor) { + // turn off onChange handler because it changes the + // msg_body and causes auto-save to trigger. See + // https://github.com/runbox/runbox7/issues/644#issuecomment-1651655948 + this.editor.off('change'); this.tinymce_plugin.remove(this.editor); } } diff --git a/src/app/compose/draftdesk.component.ts b/src/app/compose/draftdesk.component.ts index d4c94dcaf..fb3efb22e 100644 --- a/src/app/compose/draftdesk.component.ts +++ b/src/app/compose/draftdesk.component.ts @@ -114,7 +114,6 @@ export class DraftDeskComponent implements OnInit { draftDeleted(messageId) { this.draftDeskservice.deleteDraft(messageId); - this.updateDraftsInView(); } exitToTable() {