Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
## StreamChatUI
### ✅ Added
- Allow easier customisation of the `ChatChannelListItemView` [#2855](https://github.com/GetStream/stream-chat-swift/pull/2855)
### 🐞 Fixed
- Always use `reloadChannels()` in the Channel List to improve stability [#2858](https://github.com/GetStream/stream-chat-swift/pull/2858)

## ⚠️ Important
- From now on, our XCFrameworks will be built with Swift 5.7. In order to use them, you need Xcode 14 or above.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,7 @@ open class ChatChannelListVC: _ViewController,
self.controller = controller
self.controller.delegate = self
self.controller.synchronize()
channels = Array(self.controller.channels)
collectionView.reloadData()
reloadChannels()
}

/// Updates the list view with the most updated channels.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,32 +339,6 @@ final class ChatChannelListVC_Tests: XCTestCase {
XCTAssertEqual(channelListVC.reloadChannelsCallCount, 1)
}

func test_replaceChannelListController() {
let channelListVC = FakeChatChannelListVC()
channelListVC.controller = mockedChannelListController

let newController = ChannelListController_Mock()
channelListVC.replaceChannelListController(newController)

XCTAssertTrue(channelListVC.controller === newController)
XCTAssertEqual(channelListVC.mockedCollectionView.reloadDataCallCount, 1)
XCTAssertTrue(newController.delegate === channelListVC)
XCTAssertEqual(newController.synchronizeCallCount, 1)
}

func test_replaceQuery() {
let channelListVC = FakeChatChannelListVC()
channelListVC.controller = mockedChannelListController

let newQuery = ChannelListQuery(filter: .nonEmpty)
channelListVC.replaceQuery(newQuery)

XCTAssertTrue(channelListVC.controller !== mockedChannelListController)
XCTAssertEqual(channelListVC.controller.query, newQuery)
XCTAssertEqual(channelListVC.mockedCollectionView.reloadDataCallCount, 1)
XCTAssertNil(mockedChannelListController.delegate)
}

func test_swipeableViewActionViews() {
mockedChannelListController.channels_mock = [.mock(cid: .unique, ownCapabilities: [.deleteChannel])]
let channelListVC = ChatChannelListVC()
Expand Down