Skip to content

Commit

Permalink
chore(ui): move timeline/read_receipts to timeline/controller/read_re…
Browse files Browse the repository at this point in the history
…ceipts

Read receipts only make sense in the context of the timeline controller.
  • Loading branch information
bnjbvr committed Jan 9, 2025
1 parent 7dcdc92 commit f853e75
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
1 change: 1 addition & 0 deletions crates/matrix-sdk-ui/src/timeline/controller/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ use crate::{
};

mod observable_items;
mod read_receipts;
mod state;

/// Data associated to the current timeline focus.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,10 @@ use tokio_stream::wrappers::WatchStream;
use tracing::{debug, error, warn};

use super::{
controller::{
AllRemoteEvents, FullEventMeta, ObservableItemsTransaction, TimelineMetadata,
TimelineState, TimelineStateTransaction,
},
traits::RoomDataProvider,
util::{rfind_event_by_id, RelativePosition},
TimelineItem,
rfind_event_by_id, AllRemoteEvents, FullEventMeta, ObservableItemsTransaction,
RoomDataProvider, TimelineMetadata, TimelineState,
};
use crate::timeline::{controller::TimelineStateTransaction, util::RelativePosition, TimelineItem};

/// In-memory caches for read receipts.
#[derive(Clone, Debug, Default)]
Expand Down
4 changes: 2 additions & 2 deletions crates/matrix-sdk-ui/src/timeline/controller/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ use super::{
AllRemoteEvents, ObservableItems, ObservableItemsTransaction,
ObservableItemsTransactionEntry,
},
read_receipts::ReadReceipts,
DateDividerMode, HandleManyEventsResult, TimelineFocusKind, TimelineSettings,
};
use crate::{
Expand All @@ -62,7 +63,6 @@ use crate::{
event_item::{PollState, RemoteEventOrigin, ResponseData},
item::TimelineUniqueId,
reactions::Reactions,
read_receipts::ReadReceipts,
traits::RoomDataProvider,
util::{rfind_event_by_id, RelativePosition},
Profile, TimelineItem, TimelineItemKind,
Expand Down Expand Up @@ -1058,7 +1058,7 @@ pub(in crate::timeline) struct TimelineMetadata {
/// Read receipts related state.
///
/// TODO: move this over to the event cache (see also #3058).
pub read_receipts: ReadReceipts,
pub(in crate::timeline::controller) read_receipts: ReadReceipts,
}

/// Maximum number of stash pending edits.
Expand Down
1 change: 0 additions & 1 deletion crates/matrix-sdk-ui/src/timeline/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ mod item;
mod pagination;
mod pinned_events_loader;
mod reactions;
mod read_receipts;
#[cfg(test)]
mod tests;
mod to_device;
Expand Down

0 comments on commit f853e75

Please sign in to comment.