Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

add undo/redo history (ios)

ammarahm-edd2f39e319ebe
diff --git a/apps/mobile/src/views/Editor/func.js b/apps/mobile/src/views/Editor/func.js
index 3ccd040c5..dbd7fdb40 100644
--- a/apps/mobile/src/views/Editor/func.js
+++ b/apps/mobile/src/views/Editor/func.js
@@ -128,8 +128,9 @@ export async function clearEditor() {
tapCount = 0;
saveCounter = 0;
canSave = false;
- //post('clearEditor');
- //post('clearTitle');
+ post('clearEditor');
+ post('clearTitle');
+ post("clearHistory");
post('blur');
}
@@ -267,16 +268,6 @@ export function onWebViewLoad(noMenu, premium, colors) {
Platform.OS === 'android' ? EditorWebView.current?.requestFocus() : null;
post('blur');
}, 3000);
-
- /* setTimeout(() => {
-
- if (noMenu) {
- post('nomenu', true);
- } else {
- post('nomenu', false);
- }
-
- },1000) */
}
const updateEditor = async () => {
@@ -310,4 +301,5 @@ const updateEditor = async () => {
} else {
post('text', content.text);
}
+ post("clearHistory");
};
diff --git a/apps/mobile/src/views/Editor/index.js b/apps/mobile/src/views/Editor/index.js
index 44843b2a3..1c97efe38 100755
--- a/apps/mobile/src/views/Editor/index.js
+++ b/apps/mobile/src/views/Editor/index.js
@@ -211,12 +211,16 @@ const Editor = ({noMenu}) => {
<ActionIcon
name="undo-variant"
color={colors.heading}
- onPress={() => {}}
+ onPress={() => {
+ post('undo');
+ }}
/>
<ActionIcon
name="redo-variant"
color={colors.heading}
- onPress={() => {}}
+ onPress={() => {
+ post('redo');
+ }}
/>
<ActionIcon