Saved Module

← App map · The Saved tab — all saved articles and your reading lists, downloaded for offline reading by one worker and synced with your account by another.

Screenshots scroll sideways · tap to enlarge

What it does

ReadingListsFragment hosts the Compose ReadingListsScreen with two tabs, All articles and Collections (your reading lists), a search action mode, sort options and an overflow menu to create, import, select or refresh lists. All articles can be filtered to those not in any collection. Saving an article anywhere inserts a ReadingListPage into the default list through ReadingListPageDao, which enqueues SavedPageSyncService: a WorkManager worker that downloads each waiting page's mobile HTML and media for offline reading, reporting progress back to the rows. When you are logged in (and sync is on and not disabled by remote config), ReadingListSyncAdapter — another worker — merges local and remote lists both ways through ReadingListClient: it pulls changes since the last sync, applies local deletions, creates or updates remote lists and entries, and stores the new sync time. Pulling down forces a sync; reaching the list limit shows a message. Tapping a list opens ReadingListActivity; tapping an article opens it. A Discover card can generate a recommended reading list from your interests.

Logic class diagram

The screen only reads Room through its view model; two workers do all the network work in the background.

Screen composition

Save an article and sync it sequence

The database insert is the trigger: everything after it runs in workers.

Key files