File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Sources/StreamChatSwiftUI/ChatChannel/MessageList Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -6,21 +6,20 @@ import StreamChat
66import SwiftUI
77
88class ReactionsIconProvider {
9- static var images : Images { InjectedValues [ \. images] }
9+ @MainActor static var colors : ColorPalette = InjectedValues [ \. colors]
10+ @MainActor static var images : Images = InjectedValues [ \. images]
1011
11- static func icon( for reaction: MessageReactionType , useLargeIcons: Bool ) -> UIImage ? {
12+ @ MainActor static func icon( for reaction: MessageReactionType , useLargeIcons: Bool ) -> UIImage ? {
1213 if useLargeIcons {
1314 return images. availableReactions [ reaction] ? . largeIcon
1415 } else {
1516 return images. availableReactions [ reaction] ? . smallIcon
1617 }
1718 }
1819
19- static func color( for reaction: MessageReactionType , userReactionIDs: Set < MessageReactionType > ) -> Color ? {
20+ @ MainActor static func color( for reaction: MessageReactionType , userReactionIDs: Set < MessageReactionType > ) -> Color ? {
2021 let containsUserReaction = userReactionIDs. contains ( reaction)
21- let color = containsUserReaction ?
22- InjectedValues [ \. colors] . reactionCurrentUserColor :
23- InjectedValues [ \. colors] . reactionOtherUserColor
22+ let color = containsUserReaction ? colors. reactionCurrentUserColor : colors. reactionOtherUserColor
2423
2524 if let color = color {
2625 return Color ( color)
You can’t perform that action at this time.
0 commit comments