From 1b581d52e8658fdeba8886366b1de0e2899deb86 Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Thu, 15 May 2025 15:55:57 +0200 Subject: [PATCH] refactor(timeline): rename `Aggregations::apply` to `Aggregations::apply_all` It applies *all* the stashed aggregations for a given event timeline item. --- crates/matrix-sdk-ui/src/timeline/controller/aggregations.rs | 2 +- crates/matrix-sdk-ui/src/timeline/event_handler.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/matrix-sdk-ui/src/timeline/controller/aggregations.rs b/crates/matrix-sdk-ui/src/timeline/controller/aggregations.rs index fb8dc90e6..68361b1d8 100644 --- a/crates/matrix-sdk-ui/src/timeline/controller/aggregations.rs +++ b/crates/matrix-sdk-ui/src/timeline/controller/aggregations.rs @@ -353,7 +353,7 @@ impl Aggregations { /// Will return an error at the first aggregation that couldn't be applied; /// see [`Aggregation::apply`] which explains under which conditions it can /// happen. - pub fn apply( + pub fn apply_all( &self, item_id: &TimelineEventItemId, event: &mut EventTimelineItem, diff --git a/crates/matrix-sdk-ui/src/timeline/event_handler.rs b/crates/matrix-sdk-ui/src/timeline/event_handler.rs index 8de4106b7..8b36ace4f 100644 --- a/crates/matrix-sdk-ui/src/timeline/event_handler.rs +++ b/crates/matrix-sdk-ui/src/timeline/event_handler.rs @@ -1140,7 +1140,7 @@ impl<'a, 'o> TimelineEventHandler<'a, 'o> { ); // Apply any pending or stashed aggregations. - if let Err(err) = self.meta.aggregations.apply( + if let Err(err) = self.meta.aggregations.apply_all( &self.ctx.flow.timeline_item_id(), &mut item, &self.meta.room_version,