@@ -27,8 +27,8 @@ use imbl::Vector;
2727use matrix_sdk:: {
2828 deserialized_responses:: TimelineEvent ,
2929 event_cache:: {
30- DecryptionRetryRequest , EventCache , EventFocusedCache , PaginationStatus , RoomEventCache ,
31- ThreadEventCache , TimelineVectorDiffs ,
30+ DecryptionRetryRequest , EventCache , EventFocusedCache , PaginationStatus , PinnedEventsCache ,
31+ RoomEventCache , ThreadEventCache , TimelineVectorDiffs ,
3232 } ,
3333 send_queue:: {
3434 LocalEcho , LocalEchoContent , RoomSendQueueUpdate , SendHandle , SendReactionHandle ,
@@ -148,7 +148,7 @@ pub(in crate::timeline) enum TimelineFocusKind {
148148
149149 PinnedEvents {
150150 /// The cache holding all the events for this focus.
151- event_cache : RoomEventCache ,
151+ event_cache : PinnedEventsCache ,
152152 } ,
153153}
154154
@@ -395,9 +395,9 @@ impl<P: RoomDataProvider> TimelineController<P> {
395395 root_event_id : root_event_id. clone ( ) ,
396396 } ,
397397
398- TimelineFocus :: PinnedEvents => {
399- TimelineFocusKind :: PinnedEvents { event_cache : event_cache. room ( room_id) . await ?. 0 }
400- }
398+ TimelineFocus :: PinnedEvents => TimelineFocusKind :: PinnedEvents {
399+ event_cache : event_cache. pinned_events ( room_id) . await ?. 0 ,
400+ } ,
401401 } ;
402402
403403 let focus = Arc :: new ( focus) ;
@@ -1447,8 +1447,7 @@ impl TimelineController {
14471447 }
14481448
14491449 TimelineFocusKind :: PinnedEvents { event_cache } => {
1450- let ( initial_events, pinned_events_recv) =
1451- event_cache. subscribe_to_pinned_events ( ) . await ?;
1450+ let ( initial_events, pinned_events_recv) = event_cache. subscribe ( ) . await ?;
14521451
14531452 let has_events = !initial_events. is_empty ( ) ;
14541453
0 commit comments