Skip to main content

Module day

Module day 

Expand description

When a conversation’s day changes, and the clock each line carries.

One rule, used by both apps: a conversation’s lines are ordered by instant; a day divider appears before the first line of each local day, and never otherwise; and every line can name its own time. A divider carries the day in the person’s language — “Today”, “Yesterday”, the weekday inside the last week, then the date — so a line from three days ago never reads as “14:32” with no day anywhere near it.

The local zone is read once (ConversationClock::local) and threaded through, so a paint pass cannot straddle two offsets and a test can pin a zone instead of hoping the machine is in one.

Structs§

ConversationClock
The local zone and “now”, read once per pass.
ConversationDay
The local calendar day an instant falls on.
DayBreaks
Walks a conversation’s lines and says which of them start a new day.
DayDivider
DayDividerFace as a widget, for a list built of widgets: a band across its column with the day’s label at its centre, where a conversation’s day changes.
DayDividerFace
The day divider: a caption centred in a band, ruled out to both sides.

Functions§

day_break_indices
The indices of days whose day differs from the one before (the first is always included).
line_height
The height of one line of role in theme — what a conversation row reserves for its time or its delivery line.