timeline: rename item_by_transaction_id to local_item_by_transaction_id
This commit is contained in:
@@ -581,7 +581,7 @@ impl Timeline {
|
||||
let transaction_id: OwnedTransactionId = transaction_id.into();
|
||||
let item = self
|
||||
.inner
|
||||
.item_by_transaction_id(&transaction_id)
|
||||
.local_item_by_transaction_id(&transaction_id)
|
||||
.await
|
||||
.context("Item with given transaction ID not found")?;
|
||||
Ok(Arc::new(EventTimelineItem(item)))
|
||||
|
||||
@@ -5,6 +5,8 @@ Breaking changes:
|
||||
- `Timeline::edit` now takes a `RoomMessageEventContentWithoutRelation`.
|
||||
- `Timeline::send_attachment` now takes an `impl Into<PathBuf>` for the path of
|
||||
the file to send.
|
||||
- `Timeline::item_by_transaction_id` has been renamed to `Timeline::local_item_by_transaction_id`
|
||||
(always returns local echoes).
|
||||
|
||||
Bug fixes:
|
||||
|
||||
|
||||
@@ -261,14 +261,15 @@ impl Timeline {
|
||||
Some(item.to_owned())
|
||||
}
|
||||
|
||||
/// Get the current timeline item for the given transaction ID, if any.
|
||||
/// Get the current local echo timeline item for the given transaction ID,
|
||||
/// if any.
|
||||
///
|
||||
/// This will always return a local echo, if found.
|
||||
///
|
||||
/// 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 item_by_transaction_id(
|
||||
pub async fn local_item_by_transaction_id(
|
||||
&self,
|
||||
target: &TransactionId,
|
||||
) -> Option<EventTimelineItem> {
|
||||
|
||||
Reference in New Issue
Block a user