-
Notifications
You must be signed in to change notification settings - Fork 24
fix: leading-trailing-debounder - WPB-21128 #3793
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
Conversation
Co-authored-by: Sam Wyndham <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug in LeadingTrailingDebouncer where conversation message cells displayed incorrect content when updated. The fix involves removing the generic type parameter and improving the state management logic.
Key Changes:
- Simplified
LeadingTrailingDebouncerby removing generic type parameter and usingUUIDdirectly - Fixed state management logic to properly update states dictionary and handle trailing calls
- Added comprehensive test coverage for debouncer behavior
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
ConversationTableViewDataSource.swift |
Removed generic type parameter from debouncer instantiation |
LeadingTrailingDebouncerTests.swift |
Added new test file with three test cases covering single call, first-and-last, and skip scenarios |
LeadingTrailingDebouncer.swift |
Removed generic type constraint, fixed state update bug, added thread safety check, and simplified cooldown logic |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Test Results1 926 tests 1 899 ✅ 2m 39s ⏱️ Results for commit d38fb07. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: François Benaiteau <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I wish this wasn't code we needed to maintain. My brain is tired.
...os/Wire-iOS/Sources/UserInterface/Conversation/Content/ConversationTableViewDataSource.swift
Show resolved
Hide resolved
478d863 to
93d89a2
Compare
Co-authored-by: zenkins <[email protected]>
…fix/updating-message-cells-WPB-21128
Pull request was converted to draft
…eapp/wire-ios into fix/updating-message-cells-WPB-21128
…eapp/wire-ios into fix/updating-message-cells-WPB-21128 # Conflicts: # wire-ios-request-strategy/Sources/Payloads/Payload.swift
…ng-message-cells-WPB-21128
Issue
There is a bug in
LeadingTrailingDebouncerwhich causes conversation message cells to display wrong content when the content is updated.Testing
The new poll app's result cell should now always show the correct result.
Checklist
[WPB-XXX].UI accessibility checklist
If your PR includes UI changes, please utilize this checklist: