Skip to content

Commit ca32a2d

Browse files
authored
Update StreamChat dependency to 4.81.0 (#874)
* Update StreamChat dependency to 4.81.0 * Use Throttler from StreamChat
1 parent 1196ec3 commit ca32a2d

File tree

7 files changed

+7
-65
lines changed

7 files changed

+7
-65
lines changed

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.80.0"),
19+
.package(url: "https://github.com/GetStream/stream-chat-swift.git", from: "4.81.0"),
2020
],
2121
targets: [
2222
.target(

Sources/StreamChatSwiftUI/ChatChannel/ChatChannelViewModel.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ open class ChatChannelViewModel: ObservableObject, MessagesDataSource {
572572

573573
private func sendReadEventIfNeeded(for message: ChatMessage) {
574574
guard let channel, channel.unreadCount.messages > 0 else { return }
575-
throttler.throttle { [weak self] in
575+
throttler.execute { [weak self] in
576576
self?.channelController.markRead()
577577
// We keep `firstUnreadMessageId` value set which keeps showing the new messages header in the channel view
578578
}
@@ -701,7 +701,7 @@ open class ChatChannelViewModel: ObservableObject, MessagesDataSource {
701701
}
702702

703703
private func sendThreadReadEvent() {
704-
throttler.throttle { [weak self] in
704+
throttler.execute { [weak self] in
705705
self?.messageController?.markThreadRead()
706706
}
707707
}

Sources/StreamChatSwiftUI/ChatChannel/Utils/Throttler.swift

Lines changed: 0 additions & 54 deletions
This file was deleted.

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.80.0'
22+
spec.dependency 'StreamChat-XCFramework', '~> 4.81.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.80.0'
22+
spec.dependency 'StreamChat', '~> 4.81.0'
2323
end

StreamChatSwiftUI.xcodeproj/project.pbxproj

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,6 @@
349349
84782785284A4DB500D2EE11 /* ChatClient_Mock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C94CCB27578B92007FE2B9 /* ChatClient_Mock.swift */; };
350350
847CEFEE27C38ABE00606257 /* MessageCachingUtils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 847CEFED27C38ABE00606257 /* MessageCachingUtils.swift */; };
351351
847F7949282A91AD0009F74C /* ChatChannelView_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 847F7948282A91AD0009F74C /* ChatChannelView_Tests.swift */; };
352-
8482094E2ACFFCD900EF3261 /* Throttler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8482094D2ACFFCD900EF3261 /* Throttler.swift */; };
353352
848399EC275FB41B003075E4 /* ChatChannelListView_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848399EB275FB41B003075E4 /* ChatChannelListView_Tests.swift */; };
354353
848399F227601231003075E4 /* ReactionsOverlayView_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848399F127601231003075E4 /* ReactionsOverlayView_Tests.swift */; };
355354
8492974B27ABDDCB00A8EEB0 /* NotificationsHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8492974827ABDDBF00A8EEB0 /* NotificationsHandler.swift */; };
@@ -954,7 +953,6 @@
954953
847BA08827E0BAEE00ED20C7 /* WebSocketEngineMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WebSocketEngineMock.swift; sourceTree = "<group>"; };
955954
847CEFED27C38ABE00606257 /* MessageCachingUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageCachingUtils.swift; sourceTree = "<group>"; };
956955
847F7948282A91AD0009F74C /* ChatChannelView_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatChannelView_Tests.swift; sourceTree = "<group>"; };
957-
8482094D2ACFFCD900EF3261 /* Throttler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Throttler.swift; sourceTree = "<group>"; };
958956
848399EB275FB41B003075E4 /* ChatChannelListView_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatChannelListView_Tests.swift; sourceTree = "<group>"; };
959957
848399F127601231003075E4 /* ReactionsOverlayView_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ReactionsOverlayView_Tests.swift; sourceTree = "<group>"; };
960958
8492974727ABD97F00A8EEB0 /* DemoAppSwiftUI.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DemoAppSwiftUI.entitlements; sourceTree = "<group>"; };
@@ -1891,7 +1889,6 @@
18911889
8465FD2B2746A95600AF091E /* ChatChannelHelpers.swift */,
18921890
8465FD2C2746A95600AF091E /* ChatChannelExtensions.swift */,
18931891
91CC2039283C3E7F0049A146 /* URLExtensions.swift */,
1894-
8482094D2ACFFCD900EF3261 /* Throttler.swift */,
18951892
);
18961893
path = Utils;
18971894
sourceTree = "<group>";
@@ -2868,7 +2865,6 @@
28682865
82D64BE22AD7E5B700C5C79E /* ImagePipeline.swift in Sources */,
28692866
82D64BF42AD7E5B700C5C79E /* ImageProcessors.swift in Sources */,
28702867
8465FD8A2746A95700AF091E /* DiscardAttachmentButton.swift in Sources */,
2871-
8482094E2ACFFCD900EF3261 /* Throttler.swift in Sources */,
28722868
84EADEBD2B28C2EC0046B50C /* RecordingState.swift in Sources */,
28732869
4F7DD9A02BFC7C6100599AA6 /* ChatClient+Extensions.swift in Sources */,
28742870
9D9A54512CB89EAA00A76D9E /* FileCDN.swift in Sources */,
@@ -3904,7 +3900,7 @@
39043900
repositoryURL = "https://github.com/GetStream/stream-chat-swift.git";
39053901
requirement = {
39063902
kind = upToNextMajorVersion;
3907-
minimumVersion = 4.80.0;
3903+
minimumVersion = 4.81.0;
39083904
};
39093905
};
39103906
E3A1C01A282BAC66002D1E26 /* XCRemoteSwiftPackageReference "sentry-cocoa" */ = {

StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelViewModel_Tests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ class ChatChannelViewModel_Tests: StreamChatTestCase {
586586
}
587587

588588
private class Throttler_Mock: Throttler {
589-
override func throttle(_ action: @escaping () -> Void) {
589+
override func execute(_ action: @escaping () -> Void) {
590590
action()
591591
}
592592
}

0 commit comments

Comments
 (0)