Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Bouvier <[email protected]>
Signed-off-by: Daniel Salinas <[email protected]>
  • Loading branch information
zzorba and bnjbvr authored Dec 20, 2024
1 parent b5e4b99 commit 71b057d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crates/matrix-sdk-base/src/store/send_queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ pub struct QueuedRequest {
/// should be handled.
pub priority: usize,

/// The time that the request was original attempted.
/// The time that the request was originally attempted.
pub created_at: Option<MilliSecondsSinceUnixEpoch>,
}

Expand Down Expand Up @@ -376,7 +376,7 @@ pub struct DependentQueuedRequest {
/// returned by the server once the local echo has been sent out.
pub parent_key: Option<SentRequestKey>,

/// The time that the request was original attempted.
/// The time that the request was originally attempted.
#[serde(skip_serializing_if = "Option::is_none")]
pub created_at: Option<MilliSecondsSinceUnixEpoch>,
}
Expand Down
1 change: 1 addition & 0 deletions crates/matrix-sdk-sqlite/src/state_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2467,6 +2467,7 @@ mod migration_tests {

Ok(())
}

fn add_dependent_send_queue_event_v7(
this: &SqliteStateStore,
txn: &Transaction<'_>,
Expand Down
2 changes: 1 addition & 1 deletion crates/matrix-sdk-ui/src/timeline/event_handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ impl<'a, 'o> TimelineEventHandler<'a, 'o> {
send_state: EventSendState::NotSentYet,
transaction_id: txn_id.to_owned(),
send_handle: send_handle.clone(),
created_at: send_handle.clone().and_then(|h| h.created_at),
created_at: send_handle.created_at,
}
.into(),

Expand Down
2 changes: 1 addition & 1 deletion crates/matrix-sdk-ui/src/timeline/event_item/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ impl EventTimelineItem {
as_variant!(&self.kind, EventTimelineItemKind::Local(local) => &local.send_state)
}

/// Get the local time that the event was enqueued at.
/// Get the time that the local event was pushed in the send queue at.
pub fn local_created_at(&self) -> Option<MilliSecondsSinceUnixEpoch> {
as_variant!(&self.kind, EventTimelineItemKind::Local(local) => local.created_at).flatten()
}
Expand Down

0 comments on commit 71b057d

Please sign in to comment.