Skip to content

Commit 1e36bde

Browse files
committed
Merge branch 'develop' into v5
# Conflicts: # Gemfile.lock # Sources/StreamChatSwiftUI/ChatChannel/ChatChannelView.swift # Sources/StreamChatSwiftUI/ChatChannel/Composer/MessageComposerView.swift # Sources/StreamChatSwiftUI/ChatChannel/MessageList/MessageListView.swift # Sources/StreamChatSwiftUI/ChatChannel/MessageList/Polls/PollOptionAllVotesViewModel.swift # StreamChatSwiftUI.xcodeproj/project.pbxproj # fastlane/Pluginfile
2 parents d406d7a + 8a1bc9c commit 1e36bde

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+488
-86
lines changed

.github/workflows/sdk-size-metrics.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
runs-on: macos-15
1919
env:
2020
GITHUB_TOKEN: '${{ secrets.CI_BOT_GITHUB_TOKEN }}'
21+
GITHUB_PR_NUM: ${{ github.event.pull_request.number }}
2122
steps:
2223
- name: Connect Bot
2324
uses: webfactory/[email protected]
@@ -28,10 +29,13 @@ jobs:
2829

2930
- uses: ./.github/actions/bootstrap
3031

31-
- name: Run SDK Size Metrics
32+
- name: Run General SDK Size Metrics
3233
run: bundle exec fastlane show_frameworks_sizes
3334
timeout-minutes: 30
3435
env:
35-
GITHUB_PR_NUM: ${{ github.event.pull_request.number }}
3636
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
3737
APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }}
38+
39+
- name: Run Detailed SDK Size Metrics
40+
run: bundle exec fastlane size_analyze
41+
timeout-minutes: 30

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ App Thinning Size Report.txt
9292
app-thinning.plist
9393
*.dmg
9494
yeetd-normal.pkg
95+
*LinkMap.txt
9596

9697
# VSCode
9798
.vscode

.spi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ builder:
44
- platform: ios
55
documentation_targets: [StreamChatSwiftUI]
66
scheme: StreamChatSwiftUI
7-
swift_version: 5.9
7+
swift_version: '6.1'

CHANGELOG.md

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

66
### 🔄 Changed
77

8+
# [4.91.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.91.0)
9+
_October 22, 2025_
10+
11+
### ✅ Added
12+
- Add the `makeAttachmentTextView` method to ViewFactory [#1013](https://github.com/GetStream/stream-chat-swiftui/pull/1013)
13+
- Allow dismissing commands overlay when tapping the message list [#1024](https://github.com/GetStream/stream-chat-swiftui/pull/1024)
14+
- Allows dismissing the keyboard attachments picker when tapping the message list [#1024](https://github.com/GetStream/stream-chat-swiftui/pull/1024)
15+
### 🐞 Fixed
16+
- Fix composer not being locked after the channel was frozen [#1015](https://github.com/GetStream/stream-chat-swiftui/pull/1015)
17+
- Fix `PollOptionAllVotesView` not updated on poll cast events [#1025](https://github.com/GetStream/stream-chat-swiftui/pull/1025)
18+
- Fix action sheet not showing when discarding Poll creation on iOS 26 [#1027](https://github.com/GetStream/stream-chat-swiftui/pull/1027)
19+
820
# [4.90.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.90.0)
921
_October 08, 2025_
1022

Gemfile.lock

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,11 @@ GEM
165165
fastlane
166166
pry
167167
fastlane-plugin-sonarcloud_metric_kit (0.2.1)
168-
fastlane-plugin-stream_actions (0.3.91)
168+
fastlane-plugin-stream_actions (0.3.101)
169169
xctest_list (= 1.2.1)
170170
fastlane-plugin-versioning (0.7.1)
171+
fastlane-plugin-xcsize (1.1.0)
172+
xcsize (= 1.1.0)
171173
fastlane-sirp (1.0.0)
172174
sysrandom (~> 1.0)
173175
gh_inspector (1.1.3)
@@ -236,7 +238,7 @@ GEM
236238
minitest (5.25.5)
237239
multi_json (1.17.0)
238240
multipart-post (2.4.1)
239-
mustermann (3.0.3)
241+
mustermann (3.0.4)
240242
ruby2_keywords (~> 0.0.1)
241243
mutex_m (0.3.0)
242244
nanaimo (0.4.0)
@@ -268,8 +270,8 @@ GEM
268270
puma (6.6.1)
269271
nio4r (~> 2.0)
270272
racc (1.8.1)
271-
rack (3.2.2)
272-
rack-protection (4.1.1)
273+
rack (3.2.3)
274+
rack-protection (4.2.0)
273275
base64 (>= 0.1.0)
274276
logger (>= 1.6.0)
275277
rack (>= 3.0.0, < 4)
@@ -323,11 +325,11 @@ GEM
323325
simctl (1.6.10)
324326
CFPropertyList
325327
naturally
326-
sinatra (4.1.1)
328+
sinatra (4.2.0)
327329
logger (>= 1.6.0)
328330
mustermann (~> 3.0)
329331
rack (>= 3.0.0, < 4)
330-
rack-protection (= 4.1.1)
332+
rack-protection (= 4.2.0)
331333
rack-session (>= 2.0.0, < 3)
332334
tilt (~> 2.0)
333335
slather (2.8.5)
@@ -362,6 +364,8 @@ GEM
362364
rouge (~> 3.28.0)
363365
xcpretty-travis-formatter (1.0.1)
364366
xcpretty (~> 0.2, >= 0.0.7)
367+
xcsize (1.1.0)
368+
commander (>= 4.6, < 6.0)
365369
xctest_list (1.2.1)
366370

367371
PLATFORMS
@@ -374,8 +378,9 @@ DEPENDENCIES
374378
fastlane-plugin-create_xcframework
375379
fastlane-plugin-lizard
376380
fastlane-plugin-sonarcloud_metric_kit
377-
fastlane-plugin-stream_actions (= 0.3.91)
381+
fastlane-plugin-stream_actions (= 0.3.101)
378382
fastlane-plugin-versioning
383+
fastlane-plugin-xcsize (= 1.1.0)
379384
json
380385
lefthook
381386
plist

Package.swift

Lines changed: 1 addition & 3 deletions
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.90.0")
19+
.package(url: "https://github.com/GetStream/stream-chat-swift.git", from: "4.91.0")
2020
],
2121
targets: [
2222
.target(
@@ -28,8 +28,6 @@ let package = Package(
2828
]
2929
)
3030

31-
#if swift(>=5.6)
3231
package.dependencies.append(
3332
.package(url: "https://github.com/apple/swift-docc-plugin", from: "1.0.0")
3433
)
35-
#endif

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.57%20MB-blue"/>
8+
<img id="stream-chat-swiftui-label" alt="StreamChatSwiftUI" src="https://img.shields.io/badge/StreamChatSwiftUI-9.58%20MB-blue"/>
99
</p>
1010

1111
## SwiftUI StreamChat SDK

Sources/StreamChatSwiftUI/ChatChannel/ChatChannelView.swift

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,20 @@ public struct ChatChannelView<Factory: ViewFactory>: View, KeyboardReadable {
7373
},
7474
onJumpToMessage: viewModel.jumpToMessage(messageId:)
7575
)
76+
.dismissKeyboardOnTap(enabled: true) {
77+
hideComposerCommandsAndAttachmentsPicker()
78+
}
7679
.overlay(
7780
viewModel.currentDateString != nil ?
7881
factory.makeDateIndicatorView(options: DateIndicatorViewOptions(dateString: viewModel.currentDateString!))
7982
: nil
8083
)
8184
} else {
8285
ZStack {
83-
factory.makeEmptyMessagesView(options: EmptyMessagesViewOptions(channel: channel, colors: colors))
84-
.dismissKeyboardOnTap(enabled: keyboardShown)
86+
factory.makeEmptyMessagesView(for: channel, colors: colors)
87+
.dismissKeyboardOnTap(enabled: keyboardShown) {
88+
hideComposerCommandsAndAttachmentsPicker()
89+
}
8590
if viewModel.shouldShowTypingIndicator {
8691
factory.makeTypingIndicatorBottomView(
8792
options: TypingIndicatorBottomViewOptions(
@@ -189,13 +194,6 @@ public struct ChatChannelView<Factory: ViewFactory>: View, KeyboardReadable {
189194
viewModel.reactionsShown = false
190195
messageDisplayInfo = nil
191196
}
192-
.onChange(of: presentationMode.wrappedValue, perform: { newValue in
193-
if newValue.isPresented == false {
194-
viewModel.onViewDissappear()
195-
} else {
196-
viewModel.setActive()
197-
}
198-
})
199197
.background(
200198
Color(colors.background).background(
201199
TabBarAccessor { _ in
@@ -226,10 +224,13 @@ public struct ChatChannelView<Factory: ViewFactory>: View, KeyboardReadable {
226224
let bottomPadding = topVC()?.view.safeAreaInsets.bottom ?? 0
227225
return bottomPadding
228226
}
229-
}
230227

231-
extension PresentationMode: Equatable {
232-
public static func == (lhs: PresentationMode, rhs: PresentationMode) -> Bool {
233-
lhs.isPresented == rhs.isPresented
228+
private func hideComposerCommandsAndAttachmentsPicker() {
229+
NotificationCenter.default.post(
230+
name: .attachmentPickerHiddenNotification, object: nil
231+
)
232+
NotificationCenter.default.post(
233+
name: .commandsOverlayHiddenNotification, object: nil
234+
)
234235
}
235236
}

Sources/StreamChatSwiftUI/ChatChannel/Composer/AttachmentPickerTypeView.swift

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public struct AttachmentPickerTypeView: View {
5050
HStack(spacing: 16) {
5151
switch pickerTypeState {
5252
case let .expanded(attachmentPickerType):
53-
if composerViewModel.channelController.channel?.canUploadFile == true {
53+
if composerViewModel.channelController.channel?.canUploadFile == true && composerViewModel.isSendMessageEnabled {
5454
PickerTypeButton(
5555
pickerTypeState: $pickerTypeState,
5656
pickerType: .media,
@@ -60,7 +60,7 @@ public struct AttachmentPickerTypeView: View {
6060
.accessibilityIdentifier("PickerTypeButtonMedia")
6161
}
6262

63-
if commandsAvailable {
63+
if commandsAvailable && composerViewModel.isSendMessageEnabled {
6464
PickerTypeButton(
6565
pickerTypeState: $pickerTypeState,
6666
pickerType: .instantCommands,
@@ -70,16 +70,18 @@ public struct AttachmentPickerTypeView: View {
7070
.accessibilityIdentifier("PickerTypeButtonCommands")
7171
}
7272
case .collapsed:
73-
Button {
74-
withAnimation {
75-
pickerTypeState = .expanded(.none)
73+
if composerViewModel.isSendMessageEnabled {
74+
Button {
75+
withAnimation {
76+
pickerTypeState = .expanded(.none)
77+
}
78+
} label: {
79+
Image(uiImage: images.shrinkInputArrow)
80+
.renderingMode(.template)
81+
.foregroundColor(Color(colors.highlightedAccentBackground))
7682
}
77-
} label: {
78-
Image(uiImage: images.shrinkInputArrow)
79-
.renderingMode(.template)
80-
.foregroundColor(Color(colors.highlightedAccentBackground))
83+
.accessibilityIdentifier("PickerTypeButtonCollapsed")
8184
}
82-
.accessibilityIdentifier("PickerTypeButtonCollapsed")
8385
}
8486
}
8587
.accessibilityElement(children: .contain)

Sources/StreamChatSwiftUI/ChatChannel/Composer/MessageComposerView.swift

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import SwiftUI
99
public struct MessageComposerView<Factory: ViewFactory>: View, KeyboardReadable {
1010
@Injected(\.colors) private var colors
1111
@Injected(\.fonts) private var fonts
12+
@Injected(\.utils) private var utils
1213

1314
// Initial popup size, before the keyboard is shown.
1415
@State private var popupSize: CGFloat = 350
@@ -249,6 +250,18 @@ public struct MessageComposerView<Factory: ViewFactory>: View, KeyboardReadable
249250
viewModel.updateDraftMessage(quotedMessage: quotedMessage)
250251
}
251252
})
253+
.onReceive(NotificationCenter.default.publisher(for: .commandsOverlayHiddenNotification)) { _ in
254+
guard utils.messageListConfig.hidesCommandsOverlayOnMessageListTap else {
255+
return
256+
}
257+
viewModel.composerCommand = nil
258+
}
259+
.onReceive(NotificationCenter.default.publisher(for: .attachmentPickerHiddenNotification)) { _ in
260+
guard utils.messageListConfig.hidesAttachmentsPickersOnMessageListTap else {
261+
return
262+
}
263+
viewModel.pickerTypeState = .expanded(.none)
264+
}
252265
.accessibilityElement(children: .contain)
253266
}
254267
}
@@ -397,15 +410,13 @@ public struct ComposerInputView<Factory: ViewFactory>: View, KeyboardReadable {
397410
}
398411

399412
factory.makeComposerTextInputView(
400-
options: ComposerTextInputViewOptions(
401-
text: $text,
402-
height: $textHeight,
403-
selectedRangeLocation: $selectedRangeLocation,
404-
placeholder: isInCooldown ? L10n.Composer.Placeholder.slowMode : L10n.Composer.Placeholder.message,
405-
editable: !isInCooldown,
406-
maxMessageLength: maxMessageLength,
407-
currentHeight: textFieldHeight
408-
)
413+
text: $text,
414+
height: $textHeight,
415+
selectedRangeLocation: $selectedRangeLocation,
416+
placeholder: isInCooldown ? L10n.Composer.Placeholder.slowMode : (isChannelFrozen ? L10n.Composer.Placeholder.messageDisabled : L10n.Composer.Placeholder.message),
417+
editable: !isInputDisabled,
418+
maxMessageLength: maxMessageLength,
419+
currentHeight: textFieldHeight
409420
)
410421
.environmentObject(viewModel)
411422
.accessibilityIdentifier("ComposerTextInputView")
@@ -462,4 +473,22 @@ public struct ComposerInputView<Factory: ViewFactory>: View, KeyboardReadable {
462473
private var isInCooldown: Bool {
463474
cooldownDuration > 0
464475
}
476+
477+
private var isChannelFrozen: Bool {
478+
!viewModel.isSendMessageEnabled
479+
}
480+
481+
private var isInputDisabled: Bool {
482+
isInCooldown || isChannelFrozen
483+
}
484+
}
485+
486+
// MARK: - Notification Names
487+
488+
extension Notification.Name {
489+
/// Notification sent when the attachments picker should be hidden.
490+
static let attachmentPickerHiddenNotification = Notification.Name("attachmentPickerHiddenNotification")
491+
492+
/// Notification sent when the commands overlay should be hidden.
493+
static let commandsOverlayHiddenNotification = Notification.Name("commandsOverlayHiddenNotification")
465494
}

0 commit comments

Comments
 (0)