mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-06 23:15:08 -04:00
chore(ui): Remove TimelineNewItemPosition.
This patch removes the `TimelineNewItemPosition` type a sit is no longer used.
This commit is contained in:
@@ -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<TimelineNewItemPosition> 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,
|
||||
|
||||
Reference in New Issue
Block a user