As mentioned in Clarification on wiped database-post, AntennaPod crashed on me three times during the start of this week. The first two times, I restored my listening history from the latest backup. Since AntennaPod has frequent automatic backups now, it was doable to manually alter the state of a handful of episodes. Not until the third crash did I go to the forum, learn about CorruptedDatabaseBackup.db and all of that.
While this should likely not happen to me again, and if it does I am now better informed, I wish the next poor victim of this bug will get the correct information already on their first crash.
Thus on git.netizen.se/AntennaPod/, fix/inform_on_db_moved there is a fix.
As noted in the commit message, I did take notice of issue #6212. Given the age of the ticket, and conversation in it, I understand that issue to be about making a perfect fix.
One can definitely improve on this, but what I have pushed is intended to more-or-less be immediately usable. And frankly, a huge improvement over suddenly and unexpectedly seeing the app in it’s freshly installed state.
The branch merely has a single commit, changing 1 line and adding 59 lines. I stacked the branch on another unrelated fix/import_isnt_export branch, which is trivial enough. Please pick and choose as you see fit.
I see that changes are requested to go through GitHub, but sincerely hope that bug fixes might be accepted through this channel also.
My changes validates with checkstyle and the the unit tests (gradlew test) all pass.
I must admit that neither Java nor android development are my fields of expertise. Let me know if anything looks odd, missing or wrong.