Open SebiderSushi opened 4 years ago
@tom-anders is this something you agree with and something i can start work on?
@markolo25 Definitely, go for it!
I had started to work on a patch yesterday and I'm in the middle of finishing it up; I guess we can see how our implementations differ.
Closing this along with the PR
Thanks! This works very well now.
One thing i noticed is that Easy xkcd version 8.0.4
allows enabling the offline modes even without internet access. I'm not sure in which state the internal index is after doing that. What i observed was that Easy xkcd would open up and poperly load the current comic and swiping would work to some extent (maybe on the comics that had cached metadata from before enabling offline mode?), but especially when picking comics from the overview screen Easy xkcd would keep showing the loading animation even on comics that i had put into the offlineData
directory.
I went ahead and wiped Easy xkcd's app data, copied the comic files i had to the offlineData
directory again, then re-enabled offline mode while being connected to the internet. The notification appeared, showing that Easy xkcd would fetch the index. None of the image files were overwritten and everything works as expected now.
Thanks for pointing that out, I think enabling offline mode should be blocked when offline.
Use case
I regularly back up my
easy xkcd
folder, partly because i like to prevent that i have to download them again, partly because i also manually fixed a few images by manually downloading comics Easy xkcd didn't fetch properly for me. If needed, i simply restore that folder from a backup. While setting up Easy xkcd on a new device, i see no option to prevent downloading exisiting images again.I would like to have a way to tell the app to look for existing files in the offline directory (also for what-if) and re-use them instead of forcibly reloading all comics. I know that i can replace the
easy xkcd
directory after that but there might be situations where downloading ~200MB can be a problem, and at the very least is it unnecessary in my case and also takes up a few minutes.