farmerbb / Notepad

A simple, bare-bones, no-frills note taking app for Android.
Apache License 2.0
337 stars 98 forks source link

Versioned frequent backups (since typed text gets erased) #69

Open jwmh opened 4 years ago

jwmh commented 4 years ago

This is actually two issues:

  1. A bug;
  2. A proposed workaround.

#

1. The bug,

which just happened to me, is that -- sometimes -- when switching between the app and other apps... ... some of the text I typed is "rewound" back to my initial input, and it "loses" more recent text. . Reproduce attempt: i.) Type some form-text in a DIFFERENT app (not notepad),, then ii.) highlight & use the android "Share..." clipboard/context menu to send it to the Notepad app. iii.) This creates a brand-new Note, w/ the relevant text. iv.) In this new Note, type some more additional text. v.) Without exiting, Switch out of the app back to first (unrelated) app. ... From that point, I dont remember the exact steps. . But somehow (maybe by re-Sharing the same text again?? Not clear)... ... When I went back into Notepad, it "reset" my Note to just its initially-shared text. . Last 10 minutes of typing gone. . Yes, auto-save was enabled.

. #

2. Proposed workaround fix:

Create a 'version' automatic feature, which saves changes every X frequency -- either time-based, or bytediff-based, or... ... Maybe could simply store the last 5 Save states ? Like, My note WAS auto-saved, several times. . Maybe that could have kept it ?

2b.

Add a button to restore X saved version, in case of: user's latest save (automatic or not) failed and corrupted/deleted text.

farmerbb commented 4 years ago

I was able to reproduce the original bug. Thanks for bring this to my attention.

I'll look into this and get this fixed.

farmerbb commented 4 years ago

Ok, I just committed a fix for this. I'll get a release out soon (within the next couple days, if not sooner) since this is a fairly critical issue.

jwmh commented 4 years ago

Oh wow- I'm really impressed. Thank you so much! I hope it wasn't difficult to reproduce.

P.S. Trivia: My experience is that another app(s), such as Gmail Go (the Android Go implementation), also seem to suffer related symptoms in similar (not nec. identical) cases. . IDK whether the steps-to-reproduce / root cause(s) are the same, or not. . (Obviously not your problem, but interesting side trivia..)