pub(crate) trait TimelineItemContentExt {
// Required methods
fn counts_as_unread(&self) -> bool;
fn counts_as_activity(&self, own_user_id: &UserId) -> bool;
fn can_show_header(&self) -> bool;
fn is_edited(&self) -> bool;
}Expand description
Extension trait for [TimelineItemContent].
Required Methods§
Sourcefn counts_as_unread(&self) -> bool
fn counts_as_unread(&self) -> bool
Whether this content can count as an unread message.
This follows the algorithm in MSC2654, excluding events that we do not show in the timeline.
Sourcefn counts_as_activity(&self, own_user_id: &UserId) -> bool
fn counts_as_activity(&self, own_user_id: &UserId) -> bool
Whether this content can count as the latest activity in a room.
This includes content that counts as unread, plus membership changes for our own user towards joining a room, so that freshly joined rooms are at the top of the list.
Sourcefn can_show_header(&self) -> bool
fn can_show_header(&self) -> bool
Whether we can show the header for this content.