Skip to main content

TimelineItemContentExt

Trait TimelineItemContentExt 

Source
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§

Source

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.

Source

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.

Source

fn can_show_header(&self) -> bool

Whether we can show the header for this content.

Source

fn is_edited(&self) -> bool

Whether this content is edited.

Implementations on Foreign Types§

Source§

impl TimelineItemContentExt for TimelineItemContent

Source§

fn counts_as_unread(&self) -> bool

Source§

fn counts_as_activity(&self, own_user_id: &UserId) -> bool

Source§

fn can_show_header(&self) -> bool

Source§

fn is_edited(&self) -> bool

Implementors§