Skip to content

Commit

Permalink
timeline: update comments around Timeline::edit
Browse files Browse the repository at this point in the history
  • Loading branch information
bnjbvr committed Jul 22, 2024
1 parent d4ad2b2 commit ec057cf
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions crates/matrix-sdk-ui/src/timeline/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,19 +479,13 @@ impl Timeline {
/// Only supports events for which [`EventTimelineItem::is_editable()`]
/// returns `true`.
///
/// # Arguments
///
/// * `new_content` - The new content of the event.
///
/// * `edit_info` - A wrapper that contains the event ID and the content of
/// the event to edit.
///
/// # Returns
///
/// Returns `Ok(true)` if the edit was added to the send queue. Returns
/// `Ok(false)` if the edit targets a local item but the edit could not be
/// applied, which could mean that the event was already sent. Returns an
/// error if there was an issue adding the edit to the send queue.
/// - Returns `Ok(true)` if the edit was added to the send queue.
/// - Returns `Ok(false)` if the edit targets an item that has no local nor
/// matching remote item.
/// - Returns an error if there was an issue sending the redaction event, or
/// interacting with the sending queue.
#[instrument(skip(self, new_content))]
pub async fn edit(
&self,
Expand Down

0 comments on commit ec057cf

Please sign in to comment.