Skip to content

Commit cabde8e

Browse files
committed
refactor(ui): AllRemoteEvents::back becomes last to add semantics.
This patch renames `AllRemoteEvents::back` to `last` so that it now gets a specific semantics instead of being generic.
1 parent b02fd92 commit cabde8e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

crates/matrix-sdk-ui/src/timeline/controller/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1529,7 +1529,7 @@ impl TimelineController {
15291529
/// it's folded into another timeline item.
15301530
pub(crate) async fn latest_event_id(&self) -> Option<OwnedEventId> {
15311531
let state = self.state.read().await;
1532-
state.meta.all_remote_events.back().map(|event_meta| &event_meta.event_id).cloned()
1532+
state.meta.all_remote_events.last().map(|event_meta| &event_meta.event_id).cloned()
15331533
}
15341534
}
15351535

crates/matrix-sdk-ui/src/timeline/controller/state.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1183,7 +1183,7 @@ impl AllRemoteEvents {
11831183
}
11841184

11851185
/// Return a reference to the last remote event if it exists.
1186-
pub fn back(&self) -> Option<&EventMeta> {
1186+
pub fn last(&self) -> Option<&EventMeta> {
11871187
self.0.back()
11881188
}
11891189
}

0 commit comments

Comments
 (0)