pub struct Timeline {Show 13 fields
room: WeakRef<Room>,
matrix_timeline: OnceCell<Arc<Timeline>>,
start_items: ListStore,
pub(super) sdk_items: ListStore,
end_items: ListStore,
items: FlattenListModel,
pub(super) event_map: RefCell<HashMap<TimelineEventItemId, Event>>,
state: Cell<TimelineState>,
is_empty: PhantomData<bool>,
has_room_create: Cell<bool>,
diff_handle: OnceCell<AbortHandle>,
back_pagination_status_handle: OnceCell<AbortHandle>,
read_receipts_changed_handle: OnceCell<AbortHandle>,
}
Fields§
§room: WeakRef<Room>
The room containing this timeline.
matrix_timeline: OnceCell<Arc<Timeline>>
The underlying SDK timeline.
start_items: ListStore
Items added at the start of the timeline.
sdk_items: ListStore
Items provided by the SDK timeline.
end_items: ListStore
Items added at the end of the timeline.
items: FlattenListModel
The GListModel
containing all the timeline items.
event_map: RefCell<HashMap<TimelineEventItemId, Event>>
A Hashmap linking a TimelineEventItemId
to the corresponding
Event
.
state: Cell<TimelineState>
The state of the timeline.
is_empty: PhantomData<bool>
Whether the timeline is empty.
has_room_create: Cell<bool>
Whether the timeline has the m.room.create
event of the room.
diff_handle: OnceCell<AbortHandle>
§back_pagination_status_handle: OnceCell<AbortHandle>
§read_receipts_changed_handle: OnceCell<AbortHandle>
Implementations§
Source§impl Timeline
impl Timeline
Sourcefn register_type()
fn register_type()
Registers the type only once.
Source§impl Timeline
impl Timeline
Sourceasync fn init_matrix_timeline(&self)
async fn init_matrix_timeline(&self)
Initialize the underlying SDK timeline.
Sourcepub(super) fn matrix_timeline(&self) -> &Arc<SdkTimeline>
pub(super) fn matrix_timeline(&self) -> &Arc<SdkTimeline>
The underlying SDK timeline.
Sourcepub(super) fn set_has_room_create(&self, has_room_create: bool)
pub(super) fn set_has_room_create(&self, has_room_create: bool)
Set whether the timeline has the m.room.create
event of the room.
Sourcefn update(&self, diff: VectorDiff<Arc<SdkTimelineItem>>)
fn update(&self, diff: VectorDiff<Arc<SdkTimelineItem>>)
Update this Timeline
with the given diff.
Sourcefn update_items_headers(&self, pos: u32, nb: u32)
fn update_items_headers(&self, pos: u32, nb: u32)
Update nb
items’ headers starting at pos
.
Sourcefn create_item(&self, item: &SdkTimelineItem) -> TimelineItem
fn create_item(&self, item: &SdkTimelineItem) -> TimelineItem
Create a TimelineItem
in this Timeline
from the given SDK
timeline item.
Sourcefn remove_item(&self, item: &TimelineItem)
fn remove_item(&self, item: &TimelineItem)
Remove the given item from this Timeline
.
Sourcepub(super) async fn load(&self) -> bool
pub(super) async fn load(&self) -> bool
Load more events at the start of the timeline.
Returns true
if more events can be loaded.
Sourcepub(super) fn set_state(&self, state: TimelineState)
pub(super) fn set_state(&self, state: TimelineState)
Set the state of the timeline.
Sourcefn has_typing_row(&self) -> bool
fn has_typing_row(&self) -> bool
Whether the timeline has a typing row.
Sourcefn add_typing_row(&self)
fn add_typing_row(&self)
Add the typing row to the timeline, if it isn’t present already.
Sourcepub fn remove_empty_typing_row(&self)
pub fn remove_empty_typing_row(&self)
Remove the typing row from the timeline.
Sourceasync fn watch_read_receipts(&self)
async fn watch_read_receipts(&self)
Listen to read receipts changes.
Trait Implementations§
Source§impl DerivedObjectProperties for Timeline
impl DerivedObjectProperties for Timeline
Source§fn derived_properties() -> &'static [ParamSpec]
fn derived_properties() -> &'static [ParamSpec]
Source§fn derived_property(&self, id: usize, pspec: &ParamSpec) -> Value
fn derived_property(&self, id: usize, pspec: &ParamSpec) -> Value
ObjectImpl
but auto-generated by the Properties
macro
to allow handling more complex use-cases.Source§fn derived_set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
fn derived_set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
ObjectImpl
but auto-generated by the Properties
macro
to allow handling more complex use-cases.Source§impl ObjectImpl for Timeline
impl ObjectImpl for Timeline
Source§fn properties() -> &'static [ParamSpec]
fn properties() -> &'static [ParamSpec]
Source§fn set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
fn set_property(&self, id: usize, value: &Value, pspec: &ParamSpec)
Source§fn constructed(&self)
fn constructed(&self)
Source§fn notify(&self, pspec: &ParamSpec)
fn notify(&self, pspec: &ParamSpec)
self.notify("property")
.fn dispatch_properties_changed(&self, pspecs: &[ParamSpec])
Source§impl ObjectSubclass for Timeline
impl ObjectSubclass for Timeline
Source§type ParentType = Object
type ParentType = Object
Source§type Interfaces = ()
type Interfaces = ()
Source§const ALLOW_NAME_CONFLICT: bool = false
const ALLOW_NAME_CONFLICT: bool = false
Source§fn type_init(_type_: &mut InitializingType<Self>)
fn type_init(_type_: &mut InitializingType<Self>)
Source§fn class_init(_klass: &mut Self::Class)
fn class_init(_klass: &mut Self::Class)
Source§fn with_class(_klass: &Self::Class) -> Self
fn with_class(_klass: &Self::Class) -> Self
Source§fn instance_init(_obj: &InitializingObject<Self>)
fn instance_init(_obj: &InitializingObject<Self>)
Auto Trait Implementations§
impl !Freeze for Timeline
impl !RefUnwindSafe for Timeline
impl !Send for Timeline
impl !Sync for Timeline
impl Unpin for Timeline
impl !UnwindSafe for Timeline
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> ObjectImplExt for Twhere
T: ObjectImpl,
impl<T> ObjectImplExt for Twhere
T: ObjectImpl,
Source§fn parent_constructed(&self)
fn parent_constructed(&self)
glib::Object::constructed()
.Source§fn parent_notify(&self, pspec: &ParamSpec)
fn parent_notify(&self, pspec: &ParamSpec)
glib::Object::notify()
.Source§fn parent_dispatch_properties_changed(&self, pspecs: &[ParamSpec])
fn parent_dispatch_properties_changed(&self, pspecs: &[ParamSpec])
glib::Object::dispatch_properties_changed()
.Source§fn signal_chain_from_overridden(
&self,
token: &SignalClassHandlerToken,
values: &[Value],
) -> Option<Value>
fn signal_chain_from_overridden( &self, token: &SignalClassHandlerToken, values: &[Value], ) -> Option<Value>
Source§impl<T> ObjectSubclassExt for Twhere
T: ObjectSubclass,
impl<T> ObjectSubclassExt for Twhere
T: ObjectSubclass,
Source§fn instance(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
fn instance(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
Source§fn from_instance(obj: &<T as ObjectSubclass>::Type) -> &T
fn from_instance(obj: &<T as ObjectSubclass>::Type) -> &T
Source§fn obj(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
fn obj(&self) -> BorrowedObject<'_, <T as ObjectSubclass>::Type>
Source§fn from_obj(obj: &<T as ObjectSubclass>::Type) -> &T
fn from_obj(obj: &<T as ObjectSubclass>::Type) -> &T
Source§fn ref_counted(&self) -> ObjectImplRef<T>
fn ref_counted(&self) -> ObjectImplRef<T>
self
.