@@ -36,7 +36,6 @@ use matrix_sdk_base::{
3636 sync:: Timeline ,
3737} ;
3838use matrix_sdk_common:: executor:: spawn;
39- use once_cell:: sync:: OnceCell ;
4039use ruma:: {
4140 EventId , OwnedEventId , OwnedRoomId , OwnedUserId ,
4241 events:: {
@@ -67,7 +66,6 @@ use super::{
6766 event_linked_chunk:: EventLinkedChunk ,
6867 lock,
6968 pagination:: SharedPaginationStatus ,
70- pinned_events:: PinnedEventsCache ,
7169 read_receipts:: compute_unread_counts,
7270 } ,
7371 EventsOrigin , RoomEventCacheGenericUpdate , RoomEventCacheLinkedChunkUpdate ,
@@ -111,9 +109,6 @@ pub struct RoomEventCacheState {
111109 /// permalink).
112110 event_focused_caches : HashMap < EventFocusedCacheKey , EventFocusedCache > ,
113111
114- /// Cache for pinned events in this room, initialized on-demand.
115- pinned_events_cache : OnceCell < PinnedEventsCache > ,
116-
117112 pagination_status : SharedObservable < SharedPaginationStatus > ,
118113
119114 /// A clone of [`super::RoomEventCacheInner::update_sender`].
@@ -261,7 +256,6 @@ impl LockedRoomEventCacheState {
261256 room_version_rules,
262257 waited_for_initial_prev_token : false ,
263258 subscriber_count : Default :: default ( ) ,
264- pinned_events_cache : OnceCell :: new ( ) ,
265259 automatic_pagination,
266260 } ) )
267261 }
@@ -282,11 +276,6 @@ impl<'a> lock::Reload for RoomEventCacheStateLockWriteGuard<'a> {
282276 async fn reload ( & mut self ) -> Result < ( ) , EventCacheError > {
283277 self . shrink_to_last_chunk ( ) . await ?;
284278
285- // Reload the pinned-events.
286- if let Some ( pinned_events_cache) = self . pinned_events_cache . get_mut ( ) {
287- pinned_events_cache. reload ( ) . await ?;
288- }
289-
290279 let diffs = self . state . room_linked_chunk . updates_as_vector_diffs ( ) ;
291280
292281 // Notify observers about the update.
@@ -380,13 +369,6 @@ impl<'a> RoomEventCacheStateLockWriteGuard<'a> {
380369 & mut self . state . room_linked_chunk
381370 }
382371
383- /// Get a reference to the [`pinned_events_cache`] if it has been
384- /// initialized.
385- #[ cfg( any( feature = "e2e-encryption" , test) ) ]
386- pub fn pinned_events_cache ( & self ) -> Option < & PinnedEventsCache > {
387- self . state . pinned_events_cache . get ( )
388- }
389-
390372 /// Get a reference to all the live [`event_focused_caches`].
391373 #[ cfg( feature = "e2e-encryption" ) ]
392374 pub fn event_focused_caches ( & self ) -> impl Iterator < Item = & EventFocusedCache > {
0 commit comments