I've identified some bugs around pages added to multiple reading lists:
a) If a page is in two saved reading lists and then one of those lists is un-saved, the page content directory will be deleted and the page will not be available offline when accessed via the other list. (In fact, the other list will be no longer be indicated as "available offline" because it now contains an online-only page.)
b) When trying to view a page that should be saved but isn't as a result of (a) while offline, the DAO/savedpage service will enter an infinite loop where the savedpage service continually fires, finds an OUTDATED page, then fails to save it. Going online allows the background service to perform the save, breaking the loop.
Steps to repro
- Save a page to two or more reading lists, with both available offline.
- Un-save one list.
- Go offline, clear the cache, open the reading lists fragment, open the list that should still be saved, and navigate to the shared article.
Expected: Content is still available for reading offline.
Actual: Content is unavailable; logcat shows background savedpage service looping infinitely until connectivity is restored.