Settings Topic Preferences Store
Backed by multiplatform-settings rather than androidx.datastore: DataStore's non-Android/web targets are not yet shipped, while this library has full wasmJs support (Web Storage-backed), which this app's target list requires.
Properties
The full known topic catalogue, each entry flagged with whether the user follows it. The single source of truth the rest of the app reacts to: updated by syncKnownTopics (server fetch) and setSelectedTopics (user editing interests), and persisted across launches.
The followed subset of knownTopicsFlow — what the feed header shows after "All".
Functions
Reconcile a catalogue fetched from GET /v1/topics with the known one: the server list wins (its order follows sort_order; topics it no longer serves drop out), selection flags are preserved by id, and topics never seen before come back as the return value so the UI can announce them. Newly discovered topics start unselected.