From 31e7ec182c2f9fcf375bb1ca888930e9966fc02b Mon Sep 17 00:00:00 2001 From: Ivan Enderlin Date: Tue, 28 Jan 2025 14:31:09 +0100 Subject: [PATCH] chore(ui): Remove `TimelineNewItemPosition`. This patch removes the `TimelineNewItemPosition` type a sit is no longer used. --- .../src/timeline/controller/state.rs | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/crates/matrix-sdk-ui/src/timeline/controller/state.rs b/crates/matrix-sdk-ui/src/timeline/controller/state.rs index b68c4e5bb..df067a5fe 100644 --- a/crates/matrix-sdk-ui/src/timeline/controller/state.rs +++ b/crates/matrix-sdk-ui/src/timeline/controller/state.rs @@ -69,29 +69,6 @@ use crate::{ unable_to_decrypt_hook::UtdHookManager, }; -/// This is a simplification of [`TimelineItemPosition`] which doesn't contain -/// the [`TimelineItemPosition::UpdateDecrypted`] variant, because it is used -/// only for **new** items. -#[derive(Debug)] -pub(crate) enum TimelineNewItemPosition { - /// One or more items are prepended to the timeline (i.e. they're the - /// oldest). - Start { origin: RemoteEventOrigin }, - - /// One or more items are appended to the timeline (i.e. they're the most - /// recent). - End { origin: RemoteEventOrigin }, -} - -impl From for TimelineItemPosition { - fn from(value: TimelineNewItemPosition) -> Self { - match value { - TimelineNewItemPosition::Start { origin } => Self::Start { origin }, - TimelineNewItemPosition::End { origin } => Self::End { origin }, - } - } -} - #[derive(Debug)] pub(in crate::timeline) struct TimelineState { pub items: ObservableItems,