Skip to main content

Module thread

Module thread 

Source
Expand description

A conversation: a note, what it answers, and what answers it.

A thread is opened for one note, the focused one, and gathers the other notes of its conversation as they are found: in the event store first, on the relays after. However many of them are known, they are shown as one list, in reading order: every note under the one it answers, and the answers to one note oldest first.

Notes written in the order of their numbers, each answering the one its arrow comes from:

flowchart TD
    n1["1: the note that started it"] --> n2["2"]
    n1 --> n4["4"]
    n2 --> n3["3"]
    n2 --> n5["5"]
    n4 --> n6["6"]

are read as this list, each set in by how many answers deep it is:

RowNoteDepth
110
221
332
452
541
662

A note whose parent is not among the notes known goes under the root of its conversation, if that is known, and to the top if not. The order is the same however the notes arrived: the list is put in order anew each time notes are added (Thread::merge).

Where a thread’s notes come from, and which relays are asked, is in crate::guide::flows.

Structs§

Thread
The notes of one conversation, in reading order.
ThreadRow
One note of a thread, and how many notes up the conversation starts.

Functions§

arrange 🔒
notes in reading order: each under the note it answers.
reading_order 🔒
The order of the answers to one note: oldest first, and by id among notes of the same second, so the order is the same however they arrived.