Skip to content

Commit abcf9fe

Browse files
Updated StreamChat dependency (#550)
1 parent 1ed5722 commit abcf9fe

File tree

7 files changed

+23
-9
lines changed

7 files changed

+23
-9
lines changed

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
33

44
# Upcoming
55

6-
### 🔄 Changed
6+
### ✅ Added
7+
- Public init of PhotoAttachmentCell [#544](https://github.com/GetStream/stream-chat-swiftui/pull/544)
8+
- Public init for AudioRecordingInfo [547](https://github.com/GetStream/stream-chat-swiftui/pull/547)
9+
10+
### 🐞 Fixed
11+
- Update of search results when slowly typing [#550](https://github.com/GetStream/stream-chat-swiftui/issues/550)
712

813
# [4.59.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.59.0)
914
_July 10, 2024_

DemoAppSwiftUI/AppDelegate.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,6 @@ class AppDelegate: NSObject, UIApplicationDelegate {
5454
streamChat = StreamChat(chatClient: chatClient, utils: utils)
5555
*/
5656

57-
StreamRuntimeCheck._isBackgroundMappingEnabled = true
58-
5957
#if RELEASE
6058
// We're tracking Crash Reports / Issues from the Demo App to keep improving the SDK
6159
SentrySDK.start { options in

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ let package = Package(
1616
)
1717
],
1818
dependencies: [
19-
.package(url: "https://github.com/GetStream/stream-chat-swift.git", from: "4.59.0"),
19+
.package(url: "https://github.com/GetStream/stream-chat-swift.git", from: "4.60.0"),
2020
],
2121
targets: [
2222
.target(

Sources/StreamChatSwiftUI/ChatChannelList/ChatChannelListViewModel.swift

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ import SwiftUI
88
import UIKit
99

1010
/// View model for the `ChatChannelListView`.
11-
open class ChatChannelListViewModel: ObservableObject, ChatChannelListControllerDelegate {
11+
open class ChatChannelListViewModel: ObservableObject, ChatChannelListControllerDelegate, ChatMessageSearchControllerDelegate {
12+
1213
/// Context provided dependencies.
1314
@Injected(\.chatClient) private var chatClient: ChatClient
1415
@Injected(\.images) private var images: Images
@@ -103,7 +104,9 @@ open class ChatChannelListViewModel: ObservableObject, ChatChannelListController
103104

104105
@Published public var searchText = "" {
105106
didSet {
106-
handleSearchTextChange()
107+
if searchText != oldValue {
108+
handleSearchTextChange()
109+
}
107110
}
108111
}
109112

@@ -244,6 +247,12 @@ open class ChatChannelListViewModel: ObservableObject, ChatChannelListController
244247
selectedChannel = channels.first?.channelSelectionInfo
245248
}
246249
}
250+
251+
// MARK: - ChatMessageSearchControllerDelegate
252+
253+
public func controller(_ controller: ChatMessageSearchController, didChangeMessages changes: [ListChange<ChatMessage>]) {
254+
updateSearchResults()
255+
}
247256

248257
// MARK: - private
249258

@@ -324,6 +333,7 @@ open class ChatChannelListViewModel: ObservableObject, ChatChannelListController
324333
if !searchText.isEmpty {
325334
guard let userId = chatClient.currentUserId else { return }
326335
messageSearchController = chatClient.messageSearchController()
336+
messageSearchController?.delegate = self
327337
let query = MessageSearchQuery(
328338
channelFilter: .containMembers(userIds: [userId]),
329339
messageFilter: .autocomplete(.text, text: searchText)
@@ -334,6 +344,7 @@ open class ChatChannelListViewModel: ObservableObject, ChatChannelListController
334344
self?.updateSearchResults()
335345
})
336346
} else {
347+
messageSearchController?.delegate = nil
337348
messageSearchController = nil
338349
searchResults = []
339350
updateChannels()

StreamChatSwiftUI-XCFramework.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Pod::Spec.new do |spec|
1919

2020
spec.framework = 'Foundation', 'UIKit', 'SwiftUI'
2121

22-
spec.dependency 'StreamChat-XCFramework', '~> 4.59.0'
22+
spec.dependency 'StreamChat-XCFramework', '~> 4.60.0'
2323

2424
spec.cocoapods_version = '>= 1.11.0'
2525
end

StreamChatSwiftUI.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ Pod::Spec.new do |spec|
1919

2020
spec.framework = 'Foundation', 'UIKit', 'SwiftUI'
2121

22-
spec.dependency 'StreamChat', '~> 4.59.0'
22+
spec.dependency 'StreamChat', '~> 4.60.0'
2323
end

StreamChatSwiftUI.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3705,7 +3705,7 @@
37053705
repositoryURL = "https://github.com/GetStream/stream-chat-swift.git";
37063706
requirement = {
37073707
kind = upToNextMajorVersion;
3708-
minimumVersion = 4.59.0;
3708+
minimumVersion = 4.60.0;
37093709
};
37103710
};
37113711
E3A1C01A282BAC66002D1E26 /* XCRemoteSwiftPackageReference "sentry-cocoa" */ = {

0 commit comments

Comments
 (0)