From 66ea181f6d65e8eab4363ee9f733dd7a9dc39df8 Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 26 Apr 2022 08:29:43 +0200 Subject: [PATCH] Fixed extra draft revisions --- app/src/main/java/eu/faircode/email/FragmentCompose.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index 2f1bc856d5..e6f57ff0bc 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -757,9 +757,6 @@ public class FragmentCompose extends FragmentBase { if (save && auto_save && getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) { - - etBody.setTag(null); - Bundle extras = new Bundle(); extras.putBoolean("silent", true); onAction(R.id.action_save, extras, "paragraph"); @@ -6300,8 +6297,10 @@ public class FragmentCompose extends FragmentBase { bottom_navigation.getMenu().findItem(R.id.action_undo).setVisible(draft.revision > 1); bottom_navigation.getMenu().findItem(R.id.action_redo).setVisible(draft.revision < draft.revisions); - if (args.getBundle("extras").getBoolean("silent")) + if (args.getBundle("extras").getBoolean("silent")) { + etBody.setTag(etBody.getText()); return; + } boolean needsEncryption = args.getBoolean("needsEncryption"); int action = args.getInt("action");