Dont save empty notes
The notes get saved even if there is no content and title given. I think they shouldnt be saved. Should play together with issue #58
Steps to reproduce:
- Open a new note
- Enter a title
- Remove the whole title
- A bland note will be saved
Expected: A empty note should not be saved.
I'm not sure I understnad, if you enter no text then a new note shouldn't be created. Are you saying it is? Could you put steps to reproduce please?
@deftelf I updated the issue description
Hm... This is actually tricky. By then the note has been saved, as it saves every few millis after each edit. So we would have to delete it from the server if a note has all its content removed, which is a bit unusual.
i didnt look at the code in detail, but could you not just save if title.length > 0?
You can still have a proper note even without a title though. Perhaps check contents as well. If they're both empty, don't save. On Mon, Mar 20, 2017 at 11:28 AM Benjamin Pill [email protected] wrote:
i didnt look at the code i detail, but could you not just save if title.length != null?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/standardnotes/android/issues/79#issuecomment-287854153, or mute the thread https://github.com/notifications/unsubscribe-auth/ADzi1ViMhhXTseh9qTTUa2csQGRHedbTks5rnsUwgaJpZM4Mh080 .
We save automatically when you enter text, so if you enter then delete the text, while there was text it's already saved and synced to server
imho seems not the best solution. There will be additonal problems if you have bad or no connection to the backend. Also it seems to be to much to sync every keystroke
Don't assume there's a problem unless you can demonstrate the problem. A failed sync has no effect, it just remains unsynced on disk. Too much syncing is what #58 is for.