From 70122a4407df576b803166dfa2d2c07ef3c372d2 Mon Sep 17 00:00:00 2001 From: Stefan Ceriu Date: Mon, 19 May 2025 09:05:51 +0300 Subject: [PATCH] change(ui): stop relying on a room's stored timeline for marking it as read --- bindings/matrix-sdk-ffi/src/room.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/matrix-sdk-ffi/src/room.rs b/bindings/matrix-sdk-ffi/src/room.rs index a18815a2a..d0f40f596 100644 --- a/bindings/matrix-sdk-ffi/src/room.rs +++ b/bindings/matrix-sdk-ffi/src/room.rs @@ -656,11 +656,11 @@ impl Room { /// Mark a room as read, by attaching a read receipt on the latest event. /// /// Note: this does NOT unset the unread flag; it's the caller's - /// responsibility to do so, if needs be. + /// responsibility to do so, if need be. pub async fn mark_as_read(&self, receipt_type: ReceiptType) -> Result<(), ClientError> { - let timeline = self.timeline().await?; + let timeline = TimelineBuilder::new(&self.inner).build().await?; - timeline.mark_as_read(receipt_type).await?; + timeline.mark_as_read(receipt_type.into()).await?; Ok(()) }