refactor: conversation_mut takes a closure [WPB-23149]#2048
Merged
coriolinus merged 4 commits intomainfrom Apr 21, 2026
Merged
Conversation
fewerner
reviewed
Apr 21, 2026
Contributor
fewerner
left a comment
There was a problem hiding this comment.
I like it a lot! I let Simon finish his review and approve it.
conversation_mut takesa a closure [WPB-23149]conversation_mut takes a closure [WPB-23149]
istankovic
reviewed
Apr 21, 2026
SimonThormeyer
approved these changes
Apr 21, 2026
Member
SimonThormeyer
left a comment
There was a problem hiding this comment.
Looks good. Nothing to add from my side (except maybe that 37ee969 could be folded into the commits that introduced the need for it – up to you).
This ensures we can't ever forget to call `persist_group_when_changed`. A more natural pattern in Rust would have been to return a lightweight guard type which calls `persist_group_when_changed` on `Drop`, but that doesn't work for two reasons: 1. We don't actually want to call it when an operation on the conversation has failed. 2. `Drop` isn't async.
5a15dca to
6ef84f9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What's new in this PR
This affects our internal API only, no publicly-visible changes.
PR Submission Checklist for internal contributors
SQPIT-764feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.