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
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ GEM
fastlane-plugin-stream_actions (0.3.101)
xctest_list (= 1.2.1)
fastlane-plugin-versioning (0.7.1)
fastlane-plugin-xcsize (1.1.0)
xcsize (= 1.1.0)
fastlane-plugin-xcsize (1.2.0)
xcsize (= 1.2.0)
fastlane-sirp (1.0.0)
sysrandom (~> 1.0)
gh_inspector (1.1.3)
Expand Down Expand Up @@ -364,7 +364,7 @@ GEM
rouge (~> 3.28.0)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)
xcsize (1.1.0)
xcsize (1.2.0)
commander (>= 4.6, < 6.0)
xctest_list (1.2.1)

Expand All @@ -380,7 +380,7 @@ DEPENDENCIES
fastlane-plugin-sonarcloud_metric_kit
fastlane-plugin-stream_actions (= 0.3.101)
fastlane-plugin-versioning
fastlane-plugin-xcsize (= 1.1.0)
fastlane-plugin-xcsize (= 1.2.0)
json
lefthook
plist
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.92.0")
.package(url: "https://github.com/GetStream/stream-chat-swift.git", branch: "v5")
],
targets: [
.target(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,3 @@ struct MonthlyAttachmentsHeader: View {
.background(Color(colors.background6))
}
}

extension ChatMessageFileAttachment: Identifiable {}
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public struct ChatChannelView<Factory: ViewFactory>: View, KeyboardReadable {
)
} else {
ZStack {
factory.makeEmptyMessagesView(for: channel, colors: colors)
factory.makeEmptyMessagesView(options: EmptyMessagesViewOptions(channel: channel, colors: colors))
.dismissKeyboardOnTap(enabled: keyboardShown) {
hideComposerCommandsAndAttachmentsPicker()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ import SwiftUI
}
}

extension ChatMessage: Identifiable {
extension ChatMessage {
@MainActor public var scrollMessageId: String {
messageId
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,13 +410,15 @@ public struct ComposerInputView<Factory: ViewFactory>: View, KeyboardReadable {
}

factory.makeComposerTextInputView(
text: $text,
height: $textHeight,
selectedRangeLocation: $selectedRangeLocation,
placeholder: isInCooldown ? L10n.Composer.Placeholder.slowMode : (isChannelFrozen ? L10n.Composer.Placeholder.messageDisabled : L10n.Composer.Placeholder.message),
editable: !isInputDisabled,
maxMessageLength: maxMessageLength,
currentHeight: textFieldHeight
options: ComposerTextInputViewOptions(
text: $text,
height: $textHeight,
selectedRangeLocation: $selectedRangeLocation,
placeholder: isInCooldown ? L10n.Composer.Placeholder.slowMode : (isChannelFrozen ? L10n.Composer.Placeholder.messageDisabled : L10n.Composer.Placeholder.message),
editable: !isInputDisabled,
maxMessageLength: maxMessageLength,
currentHeight: textFieldHeight
)
)
.environmentObject(viewModel)
.accessibilityIdentifier("ComposerTextInputView")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ public struct MessageListView<Factory: ViewFactory>: View, KeyboardReadable {
)
) : nil
)
.modifier(factory.makeMessageListContainerModifier())
.modifier(factory.makeMessageListContainerModifier(options: MessageListContainerModifierOptions()))
.onDisappear {
messageRenderingUtil.update(previousTopMessage: nil)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ public struct PollAttachmentView<Factory: ViewFactory>: View {
}
}

extension PollOption: Identifiable {}

struct PollOptionView<Factory: ViewFactory>: View {
@ObservedObject var viewModel: PollAttachmentViewModel

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import SwiftUI
$comments
.dropFirst()
.map { _ in true }
.assignWeakly(to: \.animateChanges, on: self)
.assign(to: \.animateChanges, onWeak: self)
.store(in: &cancellables)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import SwiftUI
$pollVotes
.dropFirst()
.map { _ in true }
.assignWeakly(to: \.animateChanges, on: self)
.assign(to: \.animateChanges, onWeak: self)
.store(in: &cancellables)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ struct PollOptionResultsView<Factory: ViewFactory>: View {
}
}

extension PollVote: Identifiable {
extension PollVote {
var displayId: String {
"\(id)-\(optionId ?? user?.id ?? "")-\(pollId)"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ import SwiftUI
.combineLatest($maxVotesEnabled)
.map { $0 && $1 }
.removeDuplicates()
.assignWeakly(to: \.showsMaxVotesError, on: self)
.assign(to: \.showsMaxVotesError, onWeak: self)
.store(in: &cancellables)
$options
.map { options in
Expand All @@ -97,7 +97,7 @@ import SwiftUI
return errorIndices
}
.removeDuplicates()
.assignWeakly(to: \.optionsErrorIndices, on: self)
.assign(to: \.optionsErrorIndices, onWeak: self)
.store(in: &cancellables)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,3 @@ struct ReactionsUsersView: View {
.accessibilityIdentifier("ReactionsUsersView")
}
}

extension ChatMessageReaction: Identifiable {
public var id: String {
"\(author.id)-\(type.rawValue)"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,3 @@ public struct ReactionIcon: View {
.foregroundColor(color)
}
}

extension MessageReactionType: Identifiable {
public var id: String {
rawValue
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,3 @@ public struct ChannelsLazyVStack<Factory: ViewFactory>: View {
.modifier(factory.makeChannelListModifier(options: ChannelListModifierOptions()))
}
}

/// Determines the uniqueness of the channel list item.
extension ChatChannel: Identifiable {
public var id: String {
cid.rawValue
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,3 @@ public struct ThreadsLazyVStack<Factory: ViewFactory>: View {
}
}
}

/// Determines the uniqueness of the channel list item.
extension ChatThread: Identifiable {
public var id: String {
parentMessageId
}
}
45 changes: 0 additions & 45 deletions Sources/StreamChatSwiftUI/DependencyInjection.swift

This file was deleted.

10 changes: 5 additions & 5 deletions Sources/StreamChatSwiftUI/InjectedValuesExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import StreamChat

extension InjectedValues {
/// Provides access to the `ChatClient` instance.
public var chatClient: ChatClient {
@MainActor public var chatClient: ChatClient {
get {
streamChat.chatClient
}
Expand All @@ -17,7 +17,7 @@ extension InjectedValues {
}

/// Provides access to the `ColorPalette` instance.
public var colors: ColorPalette {
@MainActor public var colors: ColorPalette {
get {
streamChat.appearance.colors
}
Expand All @@ -27,7 +27,7 @@ extension InjectedValues {
}

/// Provides access to the `Utils` instance.
public var utils: Utils {
@MainActor public var utils: Utils {
get {
streamChat.utils
}
Expand All @@ -37,7 +37,7 @@ extension InjectedValues {
}

/// Provides access to the `Images` instance.
public var images: Images {
@MainActor public var images: Images {
get {
streamChat.appearance.images
}
Expand All @@ -47,7 +47,7 @@ extension InjectedValues {
}

/// Provides access to the `Fonts` instance.
public var fonts: Fonts {
@MainActor public var fonts: Fonts {
get {
streamChat.appearance.fonts
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/StreamChatSwiftUI/StreamChat.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import StreamChat

/// Returns the current value for the `StreamChat` instance.
private struct StreamChatProviderKey: InjectionKey {
static var currentValue: StreamChat?
nonisolated(unsafe) static var currentValue: StreamChat?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switching to StreamCore's InjectedValues which does not use MainActor, therefore, this becomes needed again.

}

extension InjectedValues {
Expand Down

This file was deleted.

28 changes: 0 additions & 28 deletions Sources/StreamChatSwiftUI/Utils/StreamConcurrency.swift

This file was deleted.

6 changes: 6 additions & 0 deletions Sources/StreamChatSwiftUI/Utils/StreamCore+Extensions.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
//
// Copyright © 2025 Stream.io Inc. All rights reserved.
//

import Foundation
@_exported import StreamCore
Loading
Loading