Run a one-time conversion background process:
- Convert the existing offline data containing /mobile-sections-lead and /mobile-sections-remaining responses to mobile-html
- Change offline interceptor logic to look for mobile-html jsons in the 'converted files' cache instead of its internal 'okhttp-cache'
- Add logic to fall-back to the image resolution we have, when offline, instead of the actual resolution requested
- Bundle css files for sometime for offline usage
- Create /page/summary responses from existing jsons, and store it in a cache for offline use
- Add more logic to detect if the okhttp has since cached a more complete response for /mobile-html, or /page/summary which will happen if the user opens the saved page while online. Then we need to delete the 'converted' file for the article
Steps for QA
- Install an older version of app.
- Save a few pages for offline reading
- Go offline and make sure they are stored correctly. Go back online.
- Install the mobile-html version
- Go offline after the installation is complete
- Should be able to read the saved articles without any issues
Please try with a couple different older versions, skip a version or two.