Skip to content

Commit bc7b0cb

Browse files
committed
Merge branch 'develop' into fix/unmute-user-message-action
# Conflicts: # CHANGELOG.md
2 parents c8a4570 + a2fa4cf commit bc7b0cb

File tree

13 files changed

+48
-23
lines changed

13 files changed

+48
-23
lines changed

.github/workflows/cron-checks.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
setup_runtime: false
2929
- ios: 17.5
3030
xcode: 15.4
31-
os: macos-15
31+
os: macos-14
3232
device: "iPhone 15 Pro"
3333
setup_runtime: false
3434
- ios: 16.4
@@ -112,7 +112,7 @@ jobs:
112112

113113
build-old-xcode:
114114
name: Build SDKs (Xcode 15)
115-
runs-on: macos-15
115+
runs-on: macos-14
116116
env:
117117
XCODE_VERSION: "15.4"
118118
steps:
@@ -122,8 +122,6 @@ jobs:
122122
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}
123123
- uses: actions/checkout@v3.1.0
124124
- uses: ./.github/actions/ruby-cache
125-
- name: List Xcode versions
126-
run: mdfind "kMDItemCFBundleIdentifier = 'com.apple.dt.Xcode'"
127125
timeout-minutes: 25
128126
- name: Build SwiftUI
129127
run: bundle exec fastlane test_ui device:"iPhone 15" build_for_testing:true
@@ -137,7 +135,7 @@ jobs:
137135

138136
automated-code-review:
139137
name: Automated Code Review
140-
runs-on: macos-15
138+
runs-on: macos-14
141139
env:
142140
XCODE_VERSION: "15.4"
143141
steps:

.github/workflows/smoke-checks.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
4747
automated-code-review:
4848
name: Automated Code Review
49-
runs-on: macos-15
49+
runs-on: macos-14
5050
if: ${{ github.event.inputs.record_snapshots != 'true' }}
5151
env:
5252
XCODE_VERSION: "15.4"
@@ -65,7 +65,7 @@ jobs:
6565

6666
build-xcode15:
6767
name: Build SDKs (Xcode 15)
68-
runs-on: macos-15
68+
runs-on: macos-14
6969
if: ${{ github.event.inputs.record_snapshots != 'true' }}
7070
env:
7171
XCODE_VERSION: "15.4"
@@ -76,8 +76,6 @@ jobs:
7676
ssh-private-key: ${{ secrets.BOT_SSH_PRIVATE_KEY }}
7777
- uses: actions/checkout@v3.1.0
7878
- uses: ./.github/actions/ruby-cache
79-
- name: List Xcode versions
80-
run: mdfind "kMDItemCFBundleIdentifier = 'com.apple.dt.Xcode'"
8179
timeout-minutes: 25
8280
- name: Build SwiftUI
8381
run: bundle exec fastlane test_ui device:"iPhone 15" build_for_testing:true

CHANGELOG.md

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

44
# Upcoming
55

6+
### 🔄 Changed
7+
8+
# [4.79.1](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.79.1)
9+
_June 03, 2025_
10+
611
### 🐞 Fixed
712
- Fix `ChatChannelView` keyboard background not using color from palette [#845](https://github.com/GetStream/stream-chat-swiftui/pull/845)
813
- Fix showing unmute user message action just after muting the user [#847](https://github.com/GetStream/stream-chat-swiftui/pull/847)
14+
- Fix removing new messages separator when scrolling in the channel view [#846](https://github.com/GetStream/stream-chat-swiftui/pull/846)
915

1016
# [4.79.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.79.0)
1117
_May 29, 2025_

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<p align="center">
66
<a href="https://sonarcloud.io/summary/new_code?id=GetStream_stream-chat-swiftui"><img src="https://sonarcloud.io/api/project_badges/measure?project=GetStream_stream-chat-swiftui&metric=coverage" /></a>
77

8-
<img id="stream-chat-swiftui-label" alt="StreamChatSwiftUI" src="https://img.shields.io/badge/StreamChatSwiftUI-8.25%20MB-blue"/>
8+
<img id="stream-chat-swiftui-label" alt="StreamChatSwiftUI" src="https://img.shields.io/badge/StreamChatSwiftUI-8.27%20MB-blue"/>
99
</p>
1010

1111
## SwiftUI StreamChat SDK

Sources/StreamChatSwiftUI/ChatChannel/ChatChannelViewModel.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ open class ChatChannelViewModel: ObservableObject, MessagesDataSource {
5050
private var channelName = ""
5151
private var onlineIndicatorShown = false
5252
private var lastReadMessageId: String?
53-
private let throttler = Throttler(interval: 3, broadcastLatestEvent: true)
53+
var throttler = Throttler(interval: 3, broadcastLatestEvent: true)
5454

5555
public var channelController: ChatChannelController
5656
public var messageController: ChatMessageController?
@@ -574,9 +574,7 @@ open class ChatChannelViewModel: ObservableObject, MessagesDataSource {
574574
guard let channel, channel.unreadCount.messages > 0 else { return }
575575
throttler.throttle { [weak self] in
576576
self?.channelController.markRead()
577-
DispatchQueue.main.async {
578-
self?.firstUnreadMessageId = nil
579-
}
577+
// We keep `firstUnreadMessageId` value set which keeps showing the new messages header in the channel view
580578
}
581579
}
582580

Sources/StreamChatSwiftUI/Generated/SystemEnvironment+Version.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ import Foundation
77

88
enum SystemEnvironment {
99
/// A Stream Chat version.
10-
public static let version: String = "4.79.0-SNAPSHOT"
10+
public static let version: String = "4.79.1-SNAPSHOT"
1111
}

Sources/StreamChatSwiftUI/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>4.79.0</string>
18+
<string>4.79.1</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSPhotoLibraryUsageDescription</key>

StreamChatSwiftUI-XCFramework.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = 'StreamChatSwiftUI-XCFramework'
3-
spec.version = '4.79.0'
3+
spec.version = '4.79.1'
44
spec.summary = 'StreamChat SwiftUI Chat Components'
55
spec.description = 'StreamChatSwiftUI SDK offers flexible SwiftUI components able to display data provided by StreamChat SDK.'
66

@@ -19,7 +19,7 @@ Pod::Spec.new do |spec|
1919

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

22-
spec.dependency 'StreamChat-XCFramework', '~> 4.79.0'
22+
spec.dependency 'StreamChat-XCFramework', '~> 4.79.1'
2323

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

StreamChatSwiftUI.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = 'StreamChatSwiftUI'
3-
spec.version = '4.79.0'
3+
spec.version = '4.79.1'
44
spec.summary = 'StreamChat SwiftUI Chat Components'
55
spec.description = 'StreamChatSwiftUI SDK offers flexible SwiftUI components able to display data provided by StreamChat SDK.'
66

@@ -19,5 +19,5 @@ Pod::Spec.new do |spec|
1919

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

22-
spec.dependency 'StreamChat', '~> 4.79.0'
22+
spec.dependency 'StreamChat', '~> 4.79.1'
2323
end

StreamChatSwiftUI.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3900,7 +3900,7 @@
39003900
repositoryURL = "https://github.com/GetStream/stream-chat-swift.git";
39013901
requirement = {
39023902
kind = upToNextMajorVersion;
3903-
minimumVersion = 4.79.0;
3903+
minimumVersion = 4.79.1;
39043904
};
39053905
};
39063906
E3A1C01A282BAC66002D1E26 /* XCRemoteSwiftPackageReference "sentry-cocoa" */ = {

StreamChatSwiftUIArtifacts.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"4.40.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.40.0/StreamChatSwiftUI.zip","4.41.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.41.0/StreamChatSwiftUI.zip","4.42.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.42.0/StreamChatSwiftUI.zip","4.43.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.43.0/StreamChatSwiftUI.zip","4.44.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.44.0/StreamChatSwiftUI.zip","4.45.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.45.0/StreamChatSwiftUI.zip","4.46.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.46.0/StreamChatSwiftUI.zip","4.47.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.47.0/StreamChatSwiftUI.zip","4.47.1":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.47.1/StreamChatSwiftUI.zip","4.48.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.48.0/StreamChatSwiftUI.zip","4.49.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.49.0/StreamChatSwiftUI.zip","4.50.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.50.0/StreamChatSwiftUI.zip","4.50.1":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.50.1/StreamChatSwiftUI.zip","4.51.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.51.0/StreamChatSwiftUI.zip","4.52.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.52.0/StreamChatSwiftUI.zip","4.53.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.53.0/StreamChatSwiftUI.zip","4.54.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.54.0/StreamChatSwiftUI.zip","4.55.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.55.0/StreamChatSwiftUI.zip","4.56.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.56.0/StreamChatSwiftUI.zip","4.57.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.57.0/StreamChatSwiftUI.zip","4.58.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.58.0/StreamChatSwiftUI.zip","4.59.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.59.0/StreamChatSwiftUI.zip","4.60.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.60.0/StreamChatSwiftUI.zip","4.61.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.61.0/StreamChatSwiftUI.zip","4.62.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.62.0/StreamChatSwiftUI.zip","4.63.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.63.0/StreamChatSwiftUI.zip","4.64.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.64.0/StreamChatSwiftUI.zip","4.65.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.65.0/StreamChatSwiftUI.zip","4.66.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.66.0/StreamChatSwiftUI.zip","4.67.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.67.0/StreamChatSwiftUI.zip","4.68.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.68.0/StreamChatSwiftUI.zip","4.69.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.69.0/StreamChatSwiftUI.zip","4.70.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.70.0/StreamChatSwiftUI.zip","4.71.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.71.0/StreamChatSwiftUI.zip","4.72.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.72.0/StreamChatSwiftUI.zip","4.73.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.73.0/StreamChatSwiftUI.zip","4.74.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.74.0/StreamChatSwiftUI.zip","4.75.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.75.0/StreamChatSwiftUI.zip","4.76.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.76.0/StreamChatSwiftUI.zip","4.77.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.77.0/StreamChatSwiftUI.zip","4.78.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.78.0/StreamChatSwiftUI.zip","4.79.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.79.0/StreamChatSwiftUI.zip"}
1+
{"4.40.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.40.0/StreamChatSwiftUI.zip","4.41.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.41.0/StreamChatSwiftUI.zip","4.42.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.42.0/StreamChatSwiftUI.zip","4.43.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.43.0/StreamChatSwiftUI.zip","4.44.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.44.0/StreamChatSwiftUI.zip","4.45.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.45.0/StreamChatSwiftUI.zip","4.46.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.46.0/StreamChatSwiftUI.zip","4.47.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.47.0/StreamChatSwiftUI.zip","4.47.1":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.47.1/StreamChatSwiftUI.zip","4.48.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.48.0/StreamChatSwiftUI.zip","4.49.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.49.0/StreamChatSwiftUI.zip","4.50.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.50.0/StreamChatSwiftUI.zip","4.50.1":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.50.1/StreamChatSwiftUI.zip","4.51.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.51.0/StreamChatSwiftUI.zip","4.52.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.52.0/StreamChatSwiftUI.zip","4.53.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.53.0/StreamChatSwiftUI.zip","4.54.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.54.0/StreamChatSwiftUI.zip","4.55.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.55.0/StreamChatSwiftUI.zip","4.56.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.56.0/StreamChatSwiftUI.zip","4.57.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.57.0/StreamChatSwiftUI.zip","4.58.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.58.0/StreamChatSwiftUI.zip","4.59.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.59.0/StreamChatSwiftUI.zip","4.60.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.60.0/StreamChatSwiftUI.zip","4.61.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.61.0/StreamChatSwiftUI.zip","4.62.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.62.0/StreamChatSwiftUI.zip","4.63.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.63.0/StreamChatSwiftUI.zip","4.64.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.64.0/StreamChatSwiftUI.zip","4.65.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.65.0/StreamChatSwiftUI.zip","4.66.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.66.0/StreamChatSwiftUI.zip","4.67.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.67.0/StreamChatSwiftUI.zip","4.68.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.68.0/StreamChatSwiftUI.zip","4.69.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.69.0/StreamChatSwiftUI.zip","4.70.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.70.0/StreamChatSwiftUI.zip","4.71.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.71.0/StreamChatSwiftUI.zip","4.72.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.72.0/StreamChatSwiftUI.zip","4.73.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.73.0/StreamChatSwiftUI.zip","4.74.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.74.0/StreamChatSwiftUI.zip","4.75.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.75.0/StreamChatSwiftUI.zip","4.76.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.76.0/StreamChatSwiftUI.zip","4.77.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.77.0/StreamChatSwiftUI.zip","4.78.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.78.0/StreamChatSwiftUI.zip","4.79.0":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.79.0/StreamChatSwiftUI.zip","4.79.1":"https://github.com/GetStream/stream-chat-swiftui/releases/download/4.79.1/StreamChatSwiftUI.zip"}

StreamChatSwiftUITests/Tests/ChatChannel/ChatChannelViewModel_Tests.swift

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,25 @@ class ChatChannelViewModel_Tests: StreamChatTestCase {
553553
// Then
554554
XCTAssertEqual(3, viewModel.messages.count)
555555
}
556+
557+
func test_chatChannelVM_keepFirstUnreadIndexSetAfterMarkingTheChannelAsRead() {
558+
// Given
559+
let message1 = ChatMessage.mock()
560+
let message2 = ChatMessage.mock()
561+
let message3 = ChatMessage.mock()
562+
let channelController = makeChannelController(messages: [message1, message2, message3])
563+
channelController.channel_mock = .mock(cid: .unique, unreadCount: ChannelUnreadCount(messages: 1, mentions: 0))
564+
let viewModel = ChatChannelViewModel(channelController: channelController)
565+
viewModel.firstUnreadMessageId = message1.id
566+
viewModel.throttler = Throttler_Mock(interval: 0)
567+
568+
// When
569+
viewModel.handleMessageAppear(index: 0, scrollDirection: .down)
570+
571+
// Then
572+
XCTAssertEqual(1, channelController.markReadCallCount)
573+
XCTAssertNotNil(viewModel.firstUnreadMessageId)
574+
}
556575

557576
// MARK: - private
558577

@@ -565,3 +584,9 @@ class ChatChannelViewModel_Tests: StreamChatTestCase {
565584
)
566585
}
567586
}
587+
588+
private class Throttler_Mock: Throttler {
589+
override func throttle(_ action: @escaping () -> Void) {
590+
action()
591+
}
592+
}

0 commit comments

Comments
 (0)