mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-18 21:52:30 -04:00
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.
This commit is contained in:
@@ -1529,7 +1529,7 @@ impl TimelineController {
|
||||
/// it's folded into another timeline item.
|
||||
pub(crate) async fn latest_event_id(&self) -> Option<OwnedEventId> {
|
||||
let state = self.state.read().await;
|
||||
state.meta.all_remote_events.back().map(|event_meta| &event_meta.event_id).cloned()
|
||||
state.meta.all_remote_events.last().map(|event_meta| &event_meta.event_id).cloned()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1183,7 +1183,7 @@ impl AllRemoteEvents {
|
||||
}
|
||||
|
||||
/// Return a reference to the last remote event if it exists.
|
||||
pub fn back(&self) -> Option<&EventMeta> {
|
||||
pub fn last(&self) -> Option<&EventMeta> {
|
||||
self.0.back()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user