amake / orgro

An Org Mode app for iOS and Android
https://orgro.org
GNU General Public License v3.0
503 stars 23 forks source link

Restore editor screen state #115

Closed cigumo closed 2 weeks ago

cigumo commented 3 weeks ago

It would be very convenient for orgro to auto-save while editing.

I'm starting to edit a lot in it, and when switching to other apps while working, due to memory constraints I guess, orgro is closed, so my work is lost. This does not happen all the time of course, but it has happened to me twice in a week or so.

It would be awesome if we could autosave, either to the org file itself or a temporary buffer that is restored when the app is re-opened (similar to emacs # backup files).

Even a save button while editing could make it more convenient, because now I lose the cursor position when I touch the check box to save and edit again.

Thank you!

amake commented 3 weeks ago

Orgro does autosave. There is a slight delay after every edit so that it can batch saves. When autosave triggers a snackbar will appear.

Does the snackbar not show for you? Did you choose "allow" on the banner that asks if you want to save changes?

cigumo commented 3 weeks ago

Never seen it while editing. Appears after I finish editing by touching the checkbox. Am I missing something?

amake commented 3 weeks ago

Ah, I see. You mean specifically in the editor screen. Autosave only happens after the document is actually modified, which doesn't happen until you confirm your edits in the editor.

What we want here is state restoration for returning to the editor screen and for the editor content itself.

amake commented 3 weeks ago

Narrow state, search state, and editor state will be restored after termination in v1.45.0, ready for testing soon:

amake commented 2 weeks ago

This is released for all platforms.