From c130eb7e800400a9158bddebbedbac5ce5852c7d Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Tue, 15 Oct 2024 18:09:56 +0200 Subject: [PATCH] refactor(ffi): get rid of `get_event_timeline_item_by_event_id` This should be unused too. We can't plain get rid of the SDK equivalent, because it's still used in two places in the context of replies. --- bindings/matrix-sdk-ffi/src/timeline/mod.rs | 23 +-------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/bindings/matrix-sdk-ffi/src/timeline/mod.rs b/bindings/matrix-sdk-ffi/src/timeline/mod.rs index 4fe9699f849..6730442bdc1 100644 --- a/bindings/matrix-sdk-ffi/src/timeline/mod.rs +++ b/bindings/matrix-sdk-ffi/src/timeline/mod.rs @@ -53,7 +53,7 @@ use ruma::{ }, AnyMessageLikeEventContent, }, - EventId, OwnedTransactionId, + EventId, }; use tokio::{ sync::Mutex, @@ -555,27 +555,6 @@ impl Timeline { Ok(()) } - /// Get the current timeline item for the given event ID, if any. - /// - /// Will return a remote event, *or* a local echo that has been sent but not - /// yet replaced by a remote echo. - /// - /// It's preferable to store the timeline items in the model for your UI, if - /// possible, instead of just storing IDs and coming back to the timeline - /// object to look up items. - pub async fn get_event_timeline_item_by_event_id( - &self, - event_id: String, - ) -> Result { - let event_id = EventId::parse(event_id)?; - let item = self - .inner - .item_by_event_id(&event_id) - .await - .context("Item with given event ID not found")?; - Ok(item.into()) - } - /// Redacts an event from the timeline. /// /// Only works for events that exist as timeline items.