Skip to content

Commit 348aedf

Browse files
committed
Merge branch 'develop' into v5
2 parents da6f2f6 + 9d0945a commit 348aedf

File tree

13 files changed

+229
-51
lines changed

13 files changed

+229
-51
lines changed

CHANGELOG.md

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

44
# Upcoming
55

6+
### 🔄 Changed
7+
8+
# [4.92.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.92.0)
9+
_November 07, 2025_
10+
611
### ✅ Added
712
- Add message highlighting on jumping to a quoted message [#1032](https://github.com/GetStream/stream-chat-swiftui/pull/1032)
813
- Display double grey checkmark when delivery events are enabled [#1038](https://github.com/GetStream/stream-chat-swiftui/pull/1038)
914

1015
### 🐞 Fixed
1116
- Fix composer deleting newly entered text after deleting draft text [#1030](https://github.com/GetStream/stream-chat-swiftui/pull/1030)
17+
- Fix mark unread action not shown for messages that are root of a thread in the channel view [#1041](https://github.com/GetStream/stream-chat-swiftui/pull/1041)
1218

1319
# [4.91.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.91.0)
1420
_October 22, 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.91.0")
19+
.package(url: "https://github.com/GetStream/stream-chat-swift.git", from: "4.92.0")
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-9.58%20MB-blue"/>
8+
<img id="stream-chat-swiftui-label" alt="StreamChatSwiftUI" src="https://img.shields.io/badge/StreamChatSwiftUI-9.63%20MB-blue"/>
99
</p>
1010

1111
## SwiftUI StreamChat SDK

Sources/StreamChatSwiftUI/ChatChannel/ChatChannelViewModel.swift

Lines changed: 27 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ import SwiftUI
5858
@Published public var scrolledId: String?
5959
@Published public var highlightedMessageId: String?
6060
@Published public var listId = UUID().uuidString
61+
// A boolean to skip highlighting of a message when scrolling to it.
62+
// This is used for scenarios when scrolling to message Id should not highlight it.
63+
var skipHighlightMessageId: String?
6164

6265
@Published public var showScrollToLatestButton = false
6366
@Published var showAlertBanner = false
@@ -173,20 +176,11 @@ import SwiftUI
173176
self?.messageCachingUtils.jumpToReplyId = scrollToMessage.messageId
174177
} else if messageController != nil, let jumpToReplyId = self?.messageCachingUtils.jumpToReplyId {
175178
self?.scrolledId = jumpToReplyId
176-
// Trigger highlight when jumping to reply in thread
177-
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { [weak self] in
178-
self?.highlightedMessageId = jumpToReplyId
179-
}
180179
// Clear scroll ID after 2 seconds
181180
DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) { [weak self] in
182181
self?.scrolledId = nil
183182
}
184-
// Clear highlight after animation completes
185-
DispatchQueue.main.asyncAfter(deadline: .now() + 0.7) { [weak self] in
186-
withAnimation {
187-
self?.highlightedMessageId = nil
188-
}
189-
}
183+
self?.highlightMessage(withId: jumpToReplyId)
190184
self?.messageCachingUtils.jumpToReplyId = nil
191185
} else if messageController == nil {
192186
self?.scrolledId = scrollToMessage?.messageId
@@ -318,20 +312,11 @@ import SwiftUI
318312
if scrolledId == nil {
319313
scrolledId = messageId
320314
}
321-
// Trigger highlight after a short delay to allow scroll animation to start
322-
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { [weak self] in
323-
self?.highlightedMessageId = messageId
324-
}
325315
// Clear scroll ID after 2 seconds
326316
DispatchQueue.main.asyncAfter(deadline: .now() + 2.0) { [weak self] in
327317
self?.scrolledId = nil
328318
}
329-
// Clear highlight after animation completes
330-
DispatchQueue.main.asyncAfter(deadline: .now() + 0.7) { [weak self] in
331-
withAnimation {
332-
self?.highlightedMessageId = nil
333-
}
334-
}
319+
highlightMessage(withId: messageId)
335320
return true
336321
} else {
337322
let message = channelController.dataStore.message(id: baseId)
@@ -360,23 +345,33 @@ import SwiftUI
360345
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { [weak self] in
361346
self?.scrolledId = toJumpId
362347
self?.loadingMessagesAround = false
363-
// Trigger highlight after scroll starts
364-
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
365-
self?.highlightedMessageId = toJumpId
366-
}
367-
// Clear highlight after animation completes
368-
DispatchQueue.main.asyncAfter(deadline: .now() + 0.7) {
369-
withAnimation {
370-
self?.highlightedMessageId = nil
371-
}
372-
}
348+
self?.highlightMessage(withId: toJumpId)
373349
}
374350
}
375351
return false
376352
}
377353
}
378354
}
379-
355+
356+
/// Highlights the message background.
357+
///
358+
/// - Parameter messageId: The ID of the message to highlight.
359+
public func highlightMessage(withId messageId: MessageId) {
360+
if skipHighlightMessageId == messageId {
361+
skipHighlightMessageId = nil
362+
return
363+
}
364+
365+
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { [weak self] in
366+
self?.highlightedMessageId = messageId
367+
}
368+
DispatchQueue.main.asyncAfter(deadline: .now() + 0.7) { [weak self] in
369+
withAnimation {
370+
self?.highlightedMessageId = nil
371+
}
372+
}
373+
}
374+
380375
open func handleMessageAppear(index: Int, scrollDirection: ScrollDirection) {
381376
if index >= channelDataSource.messages.count || loadingMessagesAround {
382377
return
@@ -561,7 +556,7 @@ import SwiftUI
561556
}
562557

563558
// MARK: - private
564-
559+
565560
private func checkForOlderMessages(index: Int) {
566561
guard index >= channelDataSource.messages.count - 25 else { return }
567562
guard !loadingPreviousMessages else { return }

Sources/StreamChatSwiftUI/ChatChannel/Reactions/MessageActions/DefaultMessageActions.swift

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,14 @@ public extension MessageAction {
121121
messageActions.append(copyAction)
122122
}
123123

124-
if message.isRootOfThread {
125-
if isInsideThreadView {
126-
let markThreadUnreadAction = markThreadAsUnreadAction(
127-
messageController: messageController,
128-
message: message,
129-
onFinish: onFinish,
130-
onError: onError
131-
)
132-
messageActions.append(markThreadUnreadAction)
133-
}
124+
if message.isRootOfThread && isInsideThreadView {
125+
let markThreadUnreadAction = markThreadAsUnreadAction(
126+
messageController: messageController,
127+
message: message,
128+
onFinish: onFinish,
129+
onError: onError
130+
)
131+
messageActions.append(markThreadUnreadAction)
134132
} else if !message.isSentByCurrentUser && channel.canReceiveReadEvents {
135133
if !message.isPartOfThread || message.showReplyInChannel {
136134
let markUnreadAction = markAsUnreadAction(

Sources/StreamChatSwiftUI/ChatChannel/Reactions/MessageActions/MessageActionsResolver.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public class MessageActionsResolver: MessageActionsResolving {
4040
} else if info.identifier == MessageActionId.markUnread {
4141
viewModel.firstUnreadMessageId = info.message.messageId
4242
viewModel.currentUserMarkedMessageUnread = true
43+
viewModel.skipHighlightMessageId = info.message.messageId
4344
viewModel.scrolledId = info.message.messageId
4445
}
4546

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.92.0-SNAPSHOT"
10+
public static let version: String = "4.93.0-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.91.0</string>
18+
<string>4.92.0</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.91.0'
3+
spec.version = '4.92.0'
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.91.0'
22+
spec.dependency 'StreamChat-XCFramework', '~> 4.92.0'
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.91.0'
3+
spec.version = '4.92.0'
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.91.0'
22+
spec.dependency 'StreamChat', '~> 4.92.0'
2323
end

0 commit comments

Comments
 (0)