File tree Expand file tree Collapse file tree
crates/matrix-sdk/src/event_cache/caches/room Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -150,23 +150,6 @@ impl RoomEventCache {
150150 Ok ( ( events, subscriber) )
151151 }
152152
153- /// Subscribe to the pinned event cache for this room.
154- ///
155- /// This is a persisted view over the pinned events of a room.
156- ///
157- /// The pinned events will be initially reloaded from storage, and/or loaded
158- /// from a network request to fetch the latest pinned events and their
159- /// relations, to update it as needed. The list of pinned events will
160- /// also be kept up-to-date as new events are pinned, and new
161- /// related events show up from other sources.
162- pub async fn subscribe_to_pinned_events (
163- & self ,
164- ) -> Result < ( Vec < Event > , Receiver < TimelineVectorDiffs > ) > {
165- let state = self . inner . state . read ( ) . await ?;
166-
167- state. subscribe_to_pinned_events ( & self . inner . weak_room ) . await
168- }
169-
170153 /// Create or get an event-focused timeline cache for this room.
171154 ///
172155 /// This creates a timeline centered around a specific event (e.g., for
Original file line number Diff line number Diff line change @@ -361,34 +361,6 @@ impl<'a> RoomEventCacheStateLockReadGuard<'a> {
361361 EventCacheStoreLockGuard :: is_dirty ( & self . store )
362362 }
363363
364- /// Subscribe to the lazily initialized pinned event cache for this
365- /// room.
366- ///
367- /// This is a persisted view over the pinned events of a room. The
368- /// pinned events will be initially loaded from a network
369- /// request to fetch the latest pinned events will be performed,
370- /// to update it as needed. The list of pinned events will also
371- /// be kept up-to-date as new events are pinned, and new related
372- /// events show up from sync or backpagination.
373- ///
374- /// This requires the room's event cache to be initialized.
375- pub async fn subscribe_to_pinned_events (
376- & self ,
377- weak_room : & WeakRoom ,
378- ) -> Result < ( Vec < Event > , Receiver < TimelineVectorDiffs > ) , EventCacheError > {
379- let pinned_events_cache = self . state . pinned_events_cache . get_or_try_init ( || {
380- PinnedEventsCache :: new (
381- weak_room,
382- self . own_user_id . clone ( ) ,
383- self . room_version_rules . clone ( ) ,
384- self . state . linked_chunk_update_sender . clone ( ) ,
385- self . state . store . clone ( ) ,
386- )
387- } ) ?;
388-
389- pinned_events_cache. subscribe ( ) . await
390- }
391-
392364 /// Get an event-focused cache for this event and thread mode, if it
393365 /// exists.
394366 ///
You can’t perform that action at this time.
0 commit comments