Skip to main content

Module notification_row

Module notification_row 

Source
Expand description

One thing the account is told of, as a row of the notifications list.

What is itself a note (a reply, a mention, a quote) shows as the note it is, under a line that says which of those it is: it can be read in full, answered and reacted to where it stands. What is only about a note (a reaction, a repost, a zap) is one short row: what was done, who did it and when, what was said with a zap, and the start of the note it is about, which a click on the row opens.

A row that is new, written since the notifications were last looked at, has a tint of the accent colour behind it. The tint takes no room: a row is as tall new as old.

Every line of a short row is one line, cut where it runs out of room, so that the row is as tall as estimated_notification_height says before it is ever laid out.

ConstantsΒ§

GLYPH_WIDTH πŸ”’
How wide the room is for what was done in a short row: an emoji, or an icon.
LINE_GAP πŸ”’
The gap between the lines of a short row, and the room under them, above the line that ends the row.
NEW_TINT πŸ”’
How strongly the accent colour tints a row that is new.
REASON_PADDING_TOP πŸ”’
The room above the line that says what a note is to the account.
SHORT_PADDING_BOTTOM πŸ”’

FunctionsΒ§

deed πŸ”’
What someone did about a note of the account’s, after their name.
estimated_notification_height
How tall the row of notification will be, set in sizes in a list width wide: near enough, for one that is a note (all of it, if a long one shows in_full), and exactly, for a short one.
glyph πŸ”’
What was done, as the picture a short row starts with: the emoji reacted with, a heart, the arrows of a repost, the bolt of a zap.
lines_under πŸ”’
The lines a short row has under who did it: what was said with a zap, if anything was, and the start of the note it is about, if that is at hand.
notification_row
The row of notification: the note it is, under what that note is to the account, or the short row of what was done about a note. With a tint of the accent colour behind it if it is_new.
one_line πŸ”’
One line of said, of size, in color: cut where the room ends, and as tall as a line whatever it says.
reason πŸ”’
What a note is to the account, in a few words.
reason_height πŸ”’
How tall the line above a note is, which says what the note is to the account, with the room above it.
short_height πŸ”’
How tall a short row is: its lines, or the picture of who did it, whichever is taller, and the room around them.
short_row πŸ”’
The short row of notification, which is about a note and is not one. A click on it opens that note’s thread, or the profile of whoever did it, of a zap that is for no note; their picture and their name lead to their profile.