cscarney / syndic

Convergent feed reader for Plasma and Android
12 stars 2 forks source link

Readable content prefetch doesn't resume after being interrupted #153

Open cscarney opened 1 year ago

cscarney commented 1 year ago

Open settings and enable "Download web content for offline viewing". Open the settings for some feed and select "Always load web content." Begin an update, wait for the initial feed update to complete (e.g. articles added to the article list) and then quit the application while readable content is being downloaded. (NB: Cancelling the update from within the application won't trigger this bug because we don't currently support aborting at that point in the update process. The abort request fails and the update runs to completion.) Relaunch the application. The interrupted update is restarted, but the readable content that previously queued never gets downloaded.

This happens because we queue a prefetch job whenever we add a new article to the database, but we don't have any persistent storage for which articles are queued. When the update is interrupted, the prefetch queue is lost, and future updates won't trigger a prefetch because the entry for the article has already been added to the database. Readable content still gets downloaded on demand when the article is opened.