diff --git a/CHANGELOG.md b/CHANGELOG.md
index e3fbaae83b..03d43fba46 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -8,7 +8,8 @@ For support you can use [the contact form](https://contact.faircode.eu/?product=
### Next version
-* Basic support for [Linked Data](https://json-ld.org/)
+* Basic support for [Linked Data](https://json-ld.org/) (GitHub version only)
+* Added option to disable saving revisions for undo/redo
* Small improvements and minor bug fixes
* Updated [translations](https://crowdin.com/project/open-source-email)
diff --git a/app/src/main/assets/CHANGELOG.md b/app/src/main/assets/CHANGELOG.md
index e3fbaae83b..03d43fba46 100644
--- a/app/src/main/assets/CHANGELOG.md
+++ b/app/src/main/assets/CHANGELOG.md
@@ -8,7 +8,8 @@ For support you can use [the contact form](https://contact.faircode.eu/?product=
### Next version
-* Basic support for [Linked Data](https://json-ld.org/)
+* Basic support for [Linked Data](https://json-ld.org/) (GitHub version only)
+* Added option to disable saving revisions for undo/redo
* Small improvements and minor bug fixes
* Updated [translations](https://crowdin.com/project/open-source-email)
diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java
index 75a9a9c292..90bd5a689d 100644
--- a/app/src/main/java/eu/faircode/email/FragmentCompose.java
+++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java
@@ -6655,6 +6655,7 @@ public class FragmentCompose extends FragmentBase {
boolean discard_delete = prefs.getBoolean("discard_delete", true);
boolean write_below = prefs.getBoolean("write_below", false);
boolean save_drafts = prefs.getBoolean("save_drafts", true);
+ boolean save_revisions = prefs.getBoolean("save_revisions", true);
int send_delayed = prefs.getInt("send_delayed", 0);
DB db = DB.getInstance(context);
@@ -6886,8 +6887,10 @@ public class FragmentCompose extends FragmentBase {
body = d.html();
// Create new revision
- draft.revisions++;
- draft.revision = draft.revisions;
+ if (save_revisions) {
+ draft.revisions++;
+ draft.revision = draft.revisions;
+ }
Helper.writeText(draft.getFile(context, draft.revision), body);
} else
diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsSend.java b/app/src/main/java/eu/faircode/email/FragmentOptionsSend.java
index 45194b7d10..4294ba4e96 100644
--- a/app/src/main/java/eu/faircode/email/FragmentOptionsSend.java
+++ b/app/src/main/java/eu/faircode/email/FragmentOptionsSend.java
@@ -76,6 +76,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
private SwitchCompat swNavColor;
private SwitchCompat swSendReminders;
private SwitchCompat swSendPending;
+ private SwitchCompat swSaveRevisions;
private SwitchCompat swAutoSaveParagraph;
private SwitchCompat swAutoSaveDot;
private SwitchCompat swDiscardDelete;
@@ -124,7 +125,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
"keyboard", "keyboard_no_fullscreen",
"suggest_names", "suggest_sent", "suggested_received", "suggest_frequently", "suggest_account", "auto_identity",
"send_reminders", "send_chips", "send_nav_color", "send_pending",
- "auto_save_paragraph", "auto_save_dot", "discard_delete",
+ "save_revisions", "auto_save_paragraph", "auto_save_dot", "discard_delete",
"send_delayed",
"answer_single", "answer_action",
"sound_sent",
@@ -164,6 +165,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
swNavColor = view.findViewById(R.id.swNavColor);
swSendReminders = view.findViewById(R.id.swSendReminders);
swSendPending = view.findViewById(R.id.swSendPending);
+ swSaveRevisions = view.findViewById(R.id.swSaveRevisions);
swAutoSaveParagraph = view.findViewById(R.id.swAutoSaveParagraph);
swAutoSaveDot = view.findViewById(R.id.swAutoSaveDot);
swDiscardDelete = view.findViewById(R.id.swDiscardDelete);
@@ -336,6 +338,13 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
}
});
+ swSaveRevisions.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
+ @Override
+ public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
+ prefs.edit().putBoolean("save_revisions", checked).apply();
+ }
+ });
+
swAutoSaveParagraph.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
@@ -781,6 +790,7 @@ public class FragmentOptionsSend extends FragmentBase implements SharedPreferenc
swNavColor.setChecked(prefs.getBoolean("send_nav_color", false));
swSendReminders.setChecked(prefs.getBoolean("send_reminders", true));
swSendPending.setChecked(prefs.getBoolean("send_pending", true));
+ swSaveRevisions.setChecked(prefs.getBoolean("save_revisions", true));
swAutoSaveParagraph.setChecked(prefs.getBoolean("auto_save_paragraph", true));
swAutoSaveDot.setChecked(prefs.getBoolean("auto_save_dot", false));
swDiscardDelete.setChecked(prefs.getBoolean("discard_delete", true));
diff --git a/app/src/main/res/layout/fragment_options_send.xml b/app/src/main/res/layout/fragment_options_send.xml
index a5f8015206..6b800e0e02 100644
--- a/app/src/main/res/layout/fragment_options_send.xml
+++ b/app/src/main/res/layout/fragment_options_send.xml
@@ -304,6 +304,18 @@
app:layout_constraintTop_toBottomOf="@id/tvSendReminders"
app:switchPadding="12dp" />
+
+
The answer button actions can also be configured in the send settings tab page
Not all actions are possible without a selection menu!
Show non-obtrusive send delayed icon
-
+ Save draft revisions for undo and redo
Automatically save a draft after every paragraph
Automatically save a draft after every sentence
+
Default text color
Default font
Use monospaced font for plain text messages
diff --git a/metadata/en-US/changelogs/2131.txt b/metadata/en-US/changelogs/2131.txt
index 0bd80d6547..d4f8375a2d 100644
--- a/metadata/en-US/changelogs/2131.txt
+++ b/metadata/en-US/changelogs/2131.txt
@@ -9,6 +9,7 @@ Vallibonavenatrix
Next version
* Basic support for Linked Data
+* Added option to disable saving revisions for undo/redo
* Small improvements and minor bug fixes
* Updated translations