Voklen / Daily-Diary

An app to create a diary entry every day
GNU General Public License v3.0
49 stars 2 forks source link

If app saves before app can load, it deletes the note (bug) #25

Closed mgolden356 closed 9 months ago

mgolden356 commented 9 months ago

My entry for the current date, very rarely, but regularly, would just delete. I think I've narrowed down what may be causing it:

Upon loading the Daily Diary App, there is a brief interval of time, (maybe 0.05-0.15 seconds in), where there is nothing written on the Daily Diary app, because it yet needs to be loaded.

Combine this with that if you save it by say, pressing back (triangle, or side-screen swipe), while the app is still loading the text, it will overwrite the day's txt file with nothing, effectively deleting the note.

To reproduce this for myself on Moto G 5G 2022, I had to put the app on the homescreen on the right so I can side-swipe (back) to exit the app (triangle) immediately to save it, and spam opening the app and pressing back to close it. If I do it quickly enough, I could reliably reproduce this bug.

I think the intended thing to happen of course is to not be allowed to save the app to the txt file until the app has had the txt file written to the app.

(Again, this is all a guess)

Just something that annoyed me when I realized my notes were deleted twice today.

Hopefullt it can be reproduced on other devices.


Again, thank you for this app and all of the updates.

Voklen commented 9 months ago

Thanks for another high-quality bug report, looking into it now.