Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions .github/workflows/cron-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
strategy:
matrix:
include:
- ios: 18.3
xcode: 16.3
- ios: 18.5
xcode: 16.4
os: macos-15
device: "iPhone 16 Pro"
setup_runtime: false
Expand Down Expand Up @@ -91,14 +91,10 @@ jobs:
strategy:
matrix:
include:
- xcode: 16.3
os: macos-15
- xcode: 16.2
- xcode: 16.4
os: macos-15
- xcode: 16.1
os: macos-15
- xcode: 16.0
os: macos-15
os: macos-14
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/smoke-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,15 @@ concurrency:

env:
HOMEBREW_NO_INSTALL_CLEANUP: 1 # Disable cleanup for homebrew, we don't need it on CI
IOS_SIMULATOR_DEVICE: "iPhone 16 Pro (18.3)"
IOS_SIMULATOR_DEVICE: "iPhone 16 Pro (18.5)"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR_NUM: ${{ github.event.pull_request.number }}

jobs:
build-test-app-and-frameworks:
name: Build Test App and Frameworks
runs-on: macos-15
if: ${{ github.event.inputs.record_snapshots != 'true' }}
steps:
- uses: actions/[email protected]
- uses: ./.github/actions/ruby-cache
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

### 🔄 Changed

# [4.86.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.86.0)
_August 21, 2025_

### 🐞 Fixed
- Fix inconsistencies in gallery view displaying images and videos [927](https://github.com/GetStream/stream-chat-swiftui/pull/927)
- Prevent audio messages increasing width in reply mode [#926](https://github.com/GetStream/stream-chat-swiftui/pull/926)

# [4.85.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.85.0)
_August 13, 2025_

Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ let package = Package(
)
],
dependencies: [
.package(url: "https://github.com/GetStream/stream-chat-swift.git", from: "4.85.0")
.package(url: "https://github.com/GetStream/stream-chat-swift.git", from: "4.86.0")
],
targets: [
.target(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,25 +54,17 @@ public struct MediaAttachmentsView<Factory: ViewFactory>: View {
ForEach(0..<viewModel.mediaItems.count, id: \.self) { mediaItemIndex in
let mediaItem = viewModel.mediaItems[mediaItemIndex]
ZStack {
if !mediaItem.isVideo, let imageAttachment = mediaItem.imageAttachment {
let index = viewModel.allImageAttachments.firstIndex { $0.id == imageAttachment.id } ?? 0
ImageAttachmentContentView(
if let mediaAttachment = mediaItem.mediaAttachment {
let index = viewModel.allMediaAttachments.firstIndex { $0.id == mediaAttachment.id
} ?? 0
MediaAttachmentContentView(
factory: factory,
mediaItem: mediaItem,
imageAttachment: imageAttachment,
allImageAttachments: viewModel.allImageAttachments,
mediaAttachment: mediaAttachment,
allMediaAttachments: viewModel.allMediaAttachments,
itemWidth: Self.itemWidth,
index: index
)
} else if let videoAttachment = mediaItem.videoAttachment {
VideoAttachmentContentView(
factory: factory,
attachment: videoAttachment,
message: mediaItem.message,
width: Self.itemWidth,
ratio: 1,
cornerRadius: 0
)
}
}
.overlay(
Expand Down Expand Up @@ -110,13 +102,13 @@ public struct MediaAttachmentsView<Factory: ViewFactory>: View {
}
}

struct ImageAttachmentContentView<Factory: ViewFactory>: View {
struct MediaAttachmentContentView<Factory: ViewFactory>: View {
@State private var galleryShown = false

let factory: Factory
let mediaItem: MediaItem
let imageAttachment: ChatMessageImageAttachment
let allImageAttachments: [ChatMessageImageAttachment]
let mediaAttachment: MediaAttachment
let allMediaAttachments: [MediaAttachment]
let itemWidth: CGFloat
let index: Int

Expand All @@ -125,7 +117,7 @@ struct ImageAttachmentContentView<Factory: ViewFactory>: View {
galleryShown = true
} label: {
LazyLoadingImage(
source: MediaAttachment(url: imageAttachment.imageURL, type: .image),
source: mediaAttachment,
width: itemWidth,
height: itemWidth
)
Expand All @@ -137,7 +129,7 @@ struct ImageAttachmentContentView<Factory: ViewFactory>: View {
}
.fullScreenCover(isPresented: $galleryShown) {
factory.makeGalleryView(
mediaAttachments: allImageAttachments.map { MediaAttachment(from: $0) },
mediaAttachments: allMediaAttachments,
message: mediaItem.message,
isShown: $galleryShown,
options: .init(selectedIndex: index)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ class MediaAttachmentsViewModel: ObservableObject, ChatMessageSearchControllerDe

private var loadingNextMessages = false

var allImageAttachments: [ChatMessageImageAttachment] {
mediaItems.compactMap(\.imageAttachment)
var allMediaAttachments: [MediaAttachment] {
mediaItems.compactMap(\.mediaAttachment)
}

init(channel: ChatChannel) {
Expand Down Expand Up @@ -113,4 +113,13 @@ struct MediaItem: Identifiable {

var videoAttachment: ChatMessageVideoAttachment?
var imageAttachment: ChatMessageImageAttachment?

var mediaAttachment: MediaAttachment? {
if let videoAttachment {
return MediaAttachment(url: videoAttachment.videoURL, type: .video)
} else if let imageAttachment {
return MediaAttachment(url: imageAttachment.imageURL, type: .image)
}
return nil
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ public struct GalleryView<Factory: ViewFactory>: View {
.foregroundColor(Color(colors.text))
}
.sheet(isPresented: $gridShown) {
GridPhotosView(
imageURLs: mediaAttachments.filter { $0.type == .image }.map(\.url),
GridMediaView(
attachments: mediaAttachments,
isShown: $gridShown
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
import StreamChat
import SwiftUI

/// View used for displaying photos in a grid.
struct GridPhotosView: View {
var imageURLs: [URL]
/// View used for displaying media in a grid.
struct GridMediaView: View {
var attachments: [MediaAttachment]
@Binding var isShown: Bool

private static let spacing: CGFloat = 2
Expand All @@ -30,9 +30,9 @@ struct GridPhotosView: View {
)
ScrollView {
LazyVGrid(columns: columns, spacing: 2) {
ForEach(imageURLs, id: \.self) { url in
ForEach(attachments) { attachment in
LazyLoadingImage(
source: MediaAttachment(url: url, type: .image),
source: attachment,
width: Self.itemWidth,
height: Self.itemWidth
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,13 +430,17 @@ extension ChatMessage {
}
}

public struct MediaAttachment {
public struct MediaAttachment: Identifiable {
@Injected(\.utils) var utils

let url: URL
let type: MediaAttachmentType
var uploadingState: AttachmentUploadingState?

public var id: String {
url.absoluteString
}

func generateThumbnail(
resize: Bool,
preferredSize: CGSize,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,13 @@ public struct QuotedMessageView<Factory: ViewFactory>: View {
Text("📊 \(poll.name)")
}

Text(textForMessage)
.foregroundColor(textColor(for: quotedMessage))
.lineLimit(3)
.font(fonts.footnote)
.accessibility(identifier: "quotedMessageText")
if !hasVoiceAttachments {
Text(textForMessage)
.foregroundColor(textColor(for: quotedMessage))
.lineLimit(3)
.font(fonts.footnote)
.accessibility(identifier: "quotedMessageText")
}

if fillAvailableSpace {
Spacer()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import Foundation

enum SystemEnvironment {
/// A Stream Chat version.
public static let version: String = "4.85.0"
public static let version: String = "4.86.0"
}
2 changes: 1 addition & 1 deletion Sources/StreamChatSwiftUI/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>4.85.0</string>
<string>4.86.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPhotoLibraryUsageDescription</key>
Expand Down
4 changes: 2 additions & 2 deletions StreamChatSwiftUI-XCFramework.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'StreamChatSwiftUI-XCFramework'
spec.version = '4.85.0'
spec.version = '4.86.0'
spec.summary = 'StreamChat SwiftUI Chat Components'
spec.description = 'StreamChatSwiftUI SDK offers flexible SwiftUI components able to display data provided by StreamChat SDK.'

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

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

spec.dependency 'StreamChat-XCFramework', '~> 4.85.0'
spec.dependency 'StreamChat-XCFramework', '~> 4.86.0'

spec.cocoapods_version = '>= 1.11.0'
end
4 changes: 2 additions & 2 deletions StreamChatSwiftUI.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |spec|
spec.name = 'StreamChatSwiftUI'
spec.version = '4.85.0'
spec.version = '4.86.0'
spec.summary = 'StreamChat SwiftUI Chat Components'
spec.description = 'StreamChatSwiftUI SDK offers flexible SwiftUI components able to display data provided by StreamChat SDK.'

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

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

spec.dependency 'StreamChat', '~> 4.85.0'
spec.dependency 'StreamChat', '~> 4.86.0'
end
18 changes: 9 additions & 9 deletions StreamChatSwiftUI.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
84335014274BAB15007A1B81 /* ViewFactoryExamples.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84335013274BAB15007A1B81 /* ViewFactoryExamples.swift */; };
84335016274BABF3007A1B81 /* NewChatView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84335015274BABF3007A1B81 /* NewChatView.swift */; };
84335018274BAD4B007A1B81 /* NewChatViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84335017274BAD4B007A1B81 /* NewChatViewModel.swift */; };
8434E58127707F19001E1B83 /* GridPhotosView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8434E58027707F19001E1B83 /* GridPhotosView.swift */; };
8434E58127707F19001E1B83 /* GridMediaView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8434E58027707F19001E1B83 /* GridMediaView.swift */; };
8434E583277088D9001E1B83 /* TitleWithCloseButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8434E582277088D9001E1B83 /* TitleWithCloseButton.swift */; };
84471C182BE98BC400D6721E /* PollAllOptionsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84471C172BE98BC400D6721E /* PollAllOptionsView.swift */; };
844CC60E2811378D0006548D /* ComposerConfig.swift in Sources */ = {isa = PBXBuildFile; fileRef = 844CC60D2811378D0006548D /* ComposerConfig.swift */; };
Expand Down Expand Up @@ -449,7 +449,7 @@
84DEC8EA2761089A00172876 /* MessageThreadHeaderViewModifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84DEC8E92761089A00172876 /* MessageThreadHeaderViewModifier.swift */; };
84DEC8EC27611CAE00172876 /* SendInChannelView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84DEC8EB27611CAE00172876 /* SendInChannelView.swift */; };
84E04789284A444E00BAFA17 /* AnyEndpoint.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C94D2127579359007FE2B9 /* AnyEndpoint.swift */; };
84E0478A284A444E00BAFA17 /* StreamChatUtilsMocks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C94D5B275A2E9F007FE2B9 /* StreamChatUtilsMocks.swift */; };
84E0478A284A444E00BAFA17 /* VideoPreviewLoader_Mock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C94D5B275A2E9F007FE2B9 /* VideoPreviewLoader_Mock.swift */; };
84E0478B284A444E00BAFA17 /* VirtualTimer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C94D272757954C007FE2B9 /* VirtualTimer.swift */; };
84E0478C284A444E00BAFA17 /* TestRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C94D1927579273007FE2B9 /* TestRequest.swift */; };
84E0478D284A444E00BAFA17 /* ImageLoader_Mock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C94D452757D1CA007FE2B9 /* ImageLoader_Mock.swift */; };
Expand Down Expand Up @@ -797,7 +797,7 @@
84335013274BAB15007A1B81 /* ViewFactoryExamples.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewFactoryExamples.swift; sourceTree = "<group>"; };
84335015274BABF3007A1B81 /* NewChatView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewChatView.swift; sourceTree = "<group>"; };
84335017274BAD4B007A1B81 /* NewChatViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NewChatViewModel.swift; sourceTree = "<group>"; };
8434E58027707F19001E1B83 /* GridPhotosView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GridPhotosView.swift; sourceTree = "<group>"; };
8434E58027707F19001E1B83 /* GridMediaView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GridMediaView.swift; sourceTree = "<group>"; };
8434E582277088D9001E1B83 /* TitleWithCloseButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TitleWithCloseButton.swift; sourceTree = "<group>"; };
84471C172BE98BC400D6721E /* PollAllOptionsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PollAllOptionsView.swift; sourceTree = "<group>"; };
844CC60D2811378D0006548D /* ComposerConfig.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ComposerConfig.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1046,7 +1046,7 @@
84C94D55275A1AE1007FE2B9 /* StringExtensions_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StringExtensions_Tests.swift; sourceTree = "<group>"; };
84C94D57275A1B89007FE2B9 /* MessageTypeResolver_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MessageTypeResolver_Tests.swift; sourceTree = "<group>"; };
84C94D59275A2E43007FE2B9 /* StreamChat_Utils_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StreamChat_Utils_Tests.swift; sourceTree = "<group>"; };
84C94D5B275A2E9F007FE2B9 /* StreamChatUtilsMocks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StreamChatUtilsMocks.swift; sourceTree = "<group>"; };
84C94D5B275A2E9F007FE2B9 /* VideoPreviewLoader_Mock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VideoPreviewLoader_Mock.swift; sourceTree = "<group>"; };
84C94D5D275A3AA9007FE2B9 /* ImageCDN_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageCDN_Tests.swift; sourceTree = "<group>"; };
84C94D5F275A45D2007FE2B9 /* ViewFactory_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewFactory_Tests.swift; sourceTree = "<group>"; };
84C94D61275A5BB7007FE2B9 /* ChatChannelNamer_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatChannelNamer_Tests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2099,7 +2099,7 @@
84C94D29275796D0007FE2B9 /* MockNetworkURLProtocol.swift */,
84C94D2B275796F7007FE2B9 /* RequestRecorderURLProtocol.swift */,
84C94D452757D1CA007FE2B9 /* ImageLoader_Mock.swift */,
84C94D5B275A2E9F007FE2B9 /* StreamChatUtilsMocks.swift */,
84C94D5B275A2E9F007FE2B9 /* VideoPreviewLoader_Mock.swift */,
847BA08227E0B9C600ED20C7 /* EventBatcherMock.swift */,
847BA08427E0BA2500ED20C7 /* EventNotificationCenterMock.swift */,
847BA08627E0BACB00ED20C7 /* WebSocketPingControllerMock.swift */,
Expand Down Expand Up @@ -2261,7 +2261,7 @@
isa = PBXGroup;
children = (
84F29089276B90610045472D /* GalleryView.swift */,
8434E58027707F19001E1B83 /* GridPhotosView.swift */,
8434E58027707F19001E1B83 /* GridMediaView.swift */,
8465FD032746A95600AF091E /* VideoPlayerView.swift */,
C52A0B5E2E1557F300176379 /* VideoPlayerFooterView.swift */,
84F2908B276B91700045472D /* ZoomableScrollView.swift */,
Expand Down Expand Up @@ -2717,7 +2717,7 @@
842FA0E72C05DCDB00AD1F3C /* PollsConfig.swift in Sources */,
841B64D42775F5540016FF3B /* GiphyCommandHandler.swift in Sources */,
82D64BDD2AD7E5B700C5C79E /* AnimatedImageView.swift in Sources */,
8434E58127707F19001E1B83 /* GridPhotosView.swift in Sources */,
8434E58127707F19001E1B83 /* GridMediaView.swift in Sources */,
ADE0F5662CB962470053B8B9 /* ActionBannerView.swift in Sources */,
84BB4C4C2841104700CBE004 /* MessageListDateUtils.swift in Sources */,
82D64BE72AD7E5B700C5C79E /* ImageTask.swift in Sources */,
Expand Down Expand Up @@ -3099,7 +3099,7 @@
84C94D422757C16D007FE2B9 /* ChatChannelListTestHelpers.swift in Sources */,
84BB4C4E284115C200CBE004 /* MessageListDateUtils_Tests.swift in Sources */,
84C94D5A275A2E43007FE2B9 /* StreamChat_Utils_Tests.swift in Sources */,
84E0478A284A444E00BAFA17 /* StreamChatUtilsMocks.swift in Sources */,
84E0478A284A444E00BAFA17 /* VideoPreviewLoader_Mock.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -3908,7 +3908,7 @@
repositoryURL = "https://github.com/GetStream/stream-chat-swift.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 4.85.0;
minimumVersion = 4.86.0;
};
};
E3A1C01A282BAC66002D1E26 /* XCRemoteSwiftPackageReference "sentry-cocoa" */ = {
Expand Down
Loading
Loading