Closed laevandus closed 3 days ago
title |
develop |
branch |
diff |
status |
---|---|---|---|---|
StreamChatSwiftUI | 7.14 MB | 7.14 MB | +1 KB | π’ |
Issues
86 New issues
0 Accepted issues
Measures
0 Security Hotspots
71.2% Coverage on New Code
0.0% Duplication on New Code
π Issue Link
Resolves: PBE-6078
π― Goal
Fix an issue where creating the channel list view with
selectedChannelId
set to a channel created a moments ago, did not select it.π Implementation
If there are integrations where a separate backend is used for creating channels and API responses contain cids, then immediately creating a channel list view and setting the selected id might fail. SDK needs to receive a web-socket event which triggers channel list change (calling synchronize can be too soon as well). Therefore, this PR changes the way how we try to set selected channel to waiting channel list updates instead. Moreover, it clarifies that the
selectedChannelId
method only works for loaded channels and it might be better to useChannelViewScreen
instead when it is certain that the channel is not part of the loaded list.π§ͺ Testing
Since the issue is around timing with other backend APIs, it is hard to manually test.
βοΈ Checklist