@@ -90,7 +90,7 @@ pub(crate) enum EventFocusedPaginationMode {
9090 } ,
9191}
9292
93- struct EventFocusedCacheInner {
93+ struct EventFocusedCacheState {
9494 /// The room owning this event-focused cache.
9595 room : WeakRoom ,
9696
@@ -104,13 +104,13 @@ struct EventFocusedCacheInner {
104104 chunk : EventLinkedChunk ,
105105
106106 /// A sender of timeline updates.
107- sender : Sender < TimelineVectorDiffs > ,
107+ sender : EventFocusedCacheUpdateSender ,
108108
109109 /// A sender for globally observable linked chunk updates.
110110 linked_chunk_update_sender : Sender < RoomEventCacheLinkedChunkUpdate > ,
111111}
112112
113- impl EventFocusedCacheInner {
113+ impl EventFocusedCacheState {
114114 /// Initialize the cache from a focused event.
115115 ///
116116 /// This uses `/context` to fetch the event with surrounding context.
@@ -521,7 +521,7 @@ impl EventFocusedCacheInner {
521521/// This is a shallow data structure, and can be cloned cheaply.
522522#[ derive( Clone ) ]
523523pub struct EventFocusedCache {
524- inner : Arc < RwLock < EventFocusedCacheInner > > ,
524+ inner : Arc < RwLock < EventFocusedCacheState > > ,
525525}
526526
527527impl EventFocusedCache {
@@ -532,7 +532,7 @@ impl EventFocusedCache {
532532 linked_chunk_update_sender : Sender < RoomEventCacheLinkedChunkUpdate > ,
533533 ) -> Self {
534534 Self {
535- inner : Arc :: new ( RwLock :: new ( EventFocusedCacheInner {
535+ inner : Arc :: new ( RwLock :: new ( EventFocusedCacheState {
536536 room,
537537 focused_event_id,
538538 pagination_mode : EventFocusedPaginationMode :: Room { hide_thread_events : false } ,
@@ -621,3 +621,6 @@ pub(in super::super) struct EventFocusedCacheKey {
621621 /// The thread mode for this cache.
622622 pub thread_mode : EventFocusThreadMode ,
623623}
624+
625+ /// A small type to send updates in all channels.
626+ pub type EventFocusedCacheUpdateSender = Sender < TimelineVectorDiffs > ;
0 commit comments