-
Notifications
You must be signed in to change notification settings - Fork 113
Fix Throttler crash in ChatChannelViewModel.handleMessageAppear()
#1050
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
Fix Throttler crash in ChatChannelViewModel.handleMessageAppear()
#1050
Conversation
| } | ||
|
|
||
| // Then - Should not crash | ||
| XCTAssert(true) |
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.
Seems like no reason to add, if crashes, then the test will crash and fail.
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.
Yes I know that, but I think it makes it easier to read the test, it's just for the sake of it. But I can remove it if you want 👍
SDK Size
|
|
Public Interface🚀 No changes affecting the public interface. |
StreamChatSwiftUI XCSize
|



🔗 Issue Links
Resolves https://linear.app/stream/issue/IOS-1245
🎯 Goal
Fix Throttler crash in
ChatChannelViewModel.handleMessageAppear().📝 Summary
ChatChannelViewModel.handleMessageAppear()🛠 Implementation
Problem:
The crash was caused by accessing the channel controller at the same time by the main thread and the Throttler's serial queue.
Solution:
We need to change the Throttler's queue to be the main thread as well, just like we are doing in UIKit.
🧪 Manual Testing Notes
N/A. Unit tests have been added to replicate the crash.
☑️ Contributor Checklist
docs-contentrepo