Expand description
Pushing favourite toggles made while the server was unreachable.
Favouriting works offline: storage_toggle_favorite writes the local
user_data row and sets pending_sync = 1. Until DR-120 nothing ever
cleared that flag — the offline mark_favorite/unmark_favorite are no-ops
and syncService.queueFavorite had no callers — so an offline toggle was
silently lost.
The drain lives in Rust, not the frontend, because it must run whether or not any view is mounted; a drain started by a component dies with it.
TRACES: UR-069 | DR-120 | UT-103
Structs§
- Pending
Favorite - A local favourite change still waiting to reach the server.
Traits§
- Favorite
Sink - The subset of the repository the drain needs.
Functions§
- drain_
pending_ favorites - Push pending favourite changes to the server and clear their flags.
- read_
pending 🔒 - Read every favourite change this user has pending.
- run_
drain 🔒 - spawn_
favorites_ drain - Drain on every offline→online transition.