Skip to main content

Module message_list

Module message_list 

Source
Expand description

A conversation, over the one virtualized list this library has.

§The list does not own the conversation

Messages, their order, their authors, and their delivery are all the caller’s. This component renders what it is handed and reports what was asked for: a failed message stays exactly where it is, with its text intact, and a retry is a request rather than a resend.

§Times are strings the host already wrote

The time on a message is an EntryTime, the same type Timeline takes, for the same reason: turning an instant into words is calendar, time-zone and locale work, and whoever owns the clock owns the wording. A message whose time nobody knows says so rather than being floated to an end that would claim when it happened.

§One message, one slot

Virtualization here is List, which is uniform_list, so every row is the same height. That is the whole reason a conversation of ten thousand messages costs the same as one of ten, and the price is that a message occupies a slot rather than growing to fit: MessageList::body_lines decides how tall the slot is, and a body longer than that says how many lines it left out instead of being quietly cut off.

Structs§

Attachment
Something carried alongside a message. The list names it and fetches nothing.
Message
One turn in a conversation.
MessageList
A conversation.
Reaction
A reaction and how many people left it.

Enums§

DeliveryState
What a host said about a message’s journey.
MessageBody
What a message says.

Functions§

streaming_since
When the streaming indicator on message in list began.