Skip to content

Commit 721abc5

Browse files
committed
Merge branch 'develop' into v5
2 parents 2beb14a + 4e4438e commit 721abc5

File tree

15 files changed

+124
-17
lines changed

15 files changed

+124
-17
lines changed

CHANGELOG.md

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

44
# Upcoming
55

6+
### ✅ Added
7+
- Opens the `commandsHandler` and makes the mention methods public [#979](https://github.com/GetStream/stream-chat-swiftui/pull/979)
8+
- Opens `MarkdownFormatter` so that it can be customised [#978](https://github.com/GetStream/stream-chat-swiftui/pull/978)
9+
10+
### 🐞 Fixed
11+
- Fix openChannel not working when searching or another chat shown [#975](https://github.com/GetStream/stream-chat-swiftui/pull/975)
12+
- Fix crash when using a font that does not support bold or italic trait [#976](https://github.com/GetStream/stream-chat-swiftui/pull/976)
13+
14+
# [4.89.1](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.89.1)
15+
_September 23, 2025_
16+
17+
### 🐞 Fixed
18+
- Fix not importing Foundation in GalleryHeaderViewDateFormatter [#970](https://github.com/GetStream/stream-chat-swiftui/pull/970)
19+
20+
# [4.89.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.89.0)
21+
_September 22, 2025_
22+
623
### ✅ Added
724
- Add `toolbarThemed(content:)` for creating custom views with themed navigation bar [#953](https://github.com/GetStream/stream-chat-swiftui/pull/953)
825
- Add support for downloading file attachments [#952](https://github.com/GetStream/stream-chat-swiftui/pull/952)

DemoAppSwiftUI/ChannelHeader/NewChatViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ import SwiftUI
9797

9898
if !loadingNextUsers {
9999
loadingNextUsers = true
100-
searchController.loadNextUsers(limit: 50) { [weak self] _ in
100+
searchController.loadNextUsers { [weak self] _ in
101101
guard let self = self else { return }
102102
self.chatUsers = self.searchController.userArray
103103
self.loadingNextUsers = false

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.88.0")
19+
.package(url: "https://github.com/GetStream/stream-chat-swift.git", from: "4.89.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.35%20MB-blue"/>
8+
<img id="stream-chat-swiftui-label" alt="StreamChatSwiftUI" src="https://img.shields.io/badge/StreamChatSwiftUI-9.43%20MB-blue"/>
99
</p>
1010

1111
## SwiftUI StreamChat SDK

Sources/StreamChatSwiftUI/ChatChannel/Composer/MessageComposerViewModel.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ import SwiftUI
219219
}
220220

221221
private var cancellables = Set<AnyCancellable>()
222-
private lazy var commandsHandler = utils
222+
public lazy var commandsHandler = utils
223223
.commandsConfig
224224
.makeCommandsHandler(
225225
with: channelController
@@ -692,7 +692,7 @@ import SwiftUI
692692
}
693693
}
694694

695-
private func checkForMentionedUsers(
695+
public func checkForMentionedUsers(
696696
commandId: String?,
697697
extraData: [String: Any]
698698
) {
@@ -703,7 +703,7 @@ import SwiftUI
703703
mentionedUsers.insert(user)
704704
}
705705

706-
private func clearRemovedMentions() {
706+
public func clearRemovedMentions() {
707707
for user in mentionedUsers {
708708
if !text.contains("@\(user.mentionText)") {
709709
mentionedUsers.remove(user)
@@ -744,7 +744,7 @@ import SwiftUI
744744
clearInputData()
745745
}
746746

747-
private func clearInputData() {
747+
public func clearInputData() {
748748
addedAssets = []
749749
addedFileURLs = []
750750
addedVoiceRecordings = []
@@ -808,7 +808,7 @@ import SwiftUI
808808
.store(in: &cancellables)
809809
}
810810

811-
private func checkChannelCooldown() {
811+
public func checkChannelCooldown() {
812812
let duration = channelController.channel?.cooldownDuration ?? 0
813813
if duration > 0 && timer == nil && !isSlowModeDisabled {
814814
cooldownDuration = duration

Sources/StreamChatSwiftUI/ChatChannelList/ChatChannelListViewModel.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,14 @@ import UIKit
212212
}
213213
}
214214
}
215+
216+
if isSearching {
217+
searchText = ""
218+
}
219+
220+
if selectedChannel != nil {
221+
selectedChannel = nil
222+
}
215223

216224
loadUntilFound()
217225
}

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.89.0-SNAPSHOT"
10+
public static let version: String = "4.90.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.88.0</string>
18+
<string>4.89.1</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSPhotoLibraryUsageDescription</key>

Sources/StreamChatSwiftUI/Utils.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import StreamChat
88
/// Class providing implementations of several utilities used in the SDK.
99
/// The default implementations can be replaced in the init method, or directly via the variables.
1010
public class Utils {
11-
var markdownFormatter = MarkdownFormatter()
11+
public var markdownFormatter: MarkdownFormatter
1212

1313
public var dateFormatter: DateFormatter
1414

@@ -77,6 +77,7 @@ public class Utils {
7777
internal var pollsDateFormatter = PollsDateFormatter()
7878

7979
public init(
80+
markdownFormatter: MarkdownFormatter = DefaultMarkdownFormatter(),
8081
dateFormatter: DateFormatter = .makeDefault(),
8182
messageRelativeDateFormatter: DateFormatter = MessageRelativeDateFormatter(),
8283
galleryHeaderViewDateFormatter: DateFormatter = GalleryHeaderViewDateFormatter(),
@@ -105,6 +106,7 @@ public class Utils {
105106
sortReactions: @escaping (MessageReactionType, MessageReactionType) -> Bool = Utils.defaultSortReactions,
106107
shouldSyncChannelControllerOnAppear: @escaping (ChatChannelController) -> Bool = { _ in true }
107108
) {
109+
self.markdownFormatter = markdownFormatter
108110
self.dateFormatter = dateFormatter
109111
self.messageRelativeDateFormatter = messageRelativeDateFormatter
110112
self.galleryHeaderViewDateFormatter = galleryHeaderViewDateFormatter

Sources/StreamChatSwiftUI/Utils/Common/GalleryHeaderViewDateFormatter.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// Copyright © 2025 Stream.io Inc. All rights reserved.
33
//
44

5+
import Foundation
6+
57
/// A formatter used to display the message timestamp in the gallery header view.
68
public final class GalleryHeaderViewDateFormatter: DateFormatter, @unchecked Sendable {
79
override public init() {

0 commit comments

Comments
 (0)