Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor!(send queue): move RoomSendQueue::unwedge to the SendHandle type #4226

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

bnjbvr
Copy link
Member

@bnjbvr bnjbvr commented Nov 6, 2024

This better encapsulates the transaction id of the send handle. Also introduced a FFI method to retrieve the SendHandle of a timeline local echo.

Let's see how hard it becomes in practice for EX apps, cc @jmartinesp @stefanceriu.

Part of #4201

@bnjbvr bnjbvr requested a review from a team as a code owner November 6, 2024 15:10
@bnjbvr bnjbvr requested review from Hywan and removed request for a team November 6, 2024 15:10
Copy link

codecov bot commented Nov 6, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 84.85%. Comparing base (8d07f36) to head (2b85bc1).
Report is 39 commits behind head on main.

Files with missing lines Patch % Lines
...rates/matrix-sdk-ui/src/timeline/event_item/mod.rs 0.00% 2 Missing ⚠️
crates/matrix-sdk/src/send_queue.rs 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4226      +/-   ##
==========================================
+ Coverage   84.83%   84.85%   +0.02%     
==========================================
  Files         273      273              
  Lines       29519    29522       +3     
==========================================
+ Hits        25042    25052      +10     
+ Misses       4477     4470       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@Hywan Hywan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a nice modification. The FFI API is nicer and less error-prone like this.

///
/// * `transaction_id` - The send queue transaction identifier of the local
/// echo that should be unwedged.
pub async fn try_resend(&self, transaction_id: String) -> Result<(), ClientError> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is totally removed. Is it intentional?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's moved to SendHandle::try_resend() :)

Comment on lines +1695 to +1696
// TODO(bnjbvr): remove this, once we have settled the `SendHandle` vs `SendAttachmentHandle`
// situation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@bnjbvr bnjbvr merged commit 8e2939b into main Nov 12, 2024
40 checks passed
@bnjbvr bnjbvr deleted the bnjbvr/refactor-send-handle-unwedge branch November 12, 2024 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants