Skip to main content

Module follow

Module follow 

Source
Expand description

Keeping a download’s bindings on its item when the list holding it changes.

A binding names a list item by its position, and positions move when items before it are removed or the list is rebuilt. A download bound with id: writes its id into the item, so before each report the app looks for the item that holds the id, and moves each binding that shares the item’s path with it to wherever that item is now.

Traits§

StatePlace
A place in an app’s state, as its runner names one.
StateReader
Reading an app’s state, for finding where a download’s id went.

Functions§

find 🔒
Where the text id is now, among the places shaped like at: at itself while it still holds it, or else the first such place that does, trying every item of each list.
follow_id
Moves bindings to the item that holds id now. false when no item holds it any more, so nothing shows the download. Bindings without an id: stay where they are.
moved 🔒
place, moved the way the id moved from from to to: the steps it shares with from follow to, and the rest stay. A place in another state shares no steps, since from and to only differ in their list positions.
search 🔒