File tree Expand file tree Collapse file tree 3 files changed +11
-9
lines changed
Sources/StreamChatSwiftUI Expand file tree Collapse file tree 3 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -387,12 +387,11 @@ open class MessageComposerViewModel: ObservableObject {
387
387
DispatchQueue . main. asyncAfter ( deadline: . now( ) + 0.25 ) { [ weak self] in
388
388
self ? . imageAssets = assets
389
389
}
390
- case . denied, . restricted:
391
- self . imageAssets = PHFetchResult < PHAsset > ( )
392
- log. debug ( " Access to photos is denied, showing the no permissions screen. " )
393
- case . notDetermined:
394
- self . imageAssets = PHFetchResult < PHAsset > ( )
395
- log. debug ( " Access to photos is still not determined. " )
390
+ case . denied, . restricted, . notDetermined:
391
+ DispatchQueue . main. async { [ weak self] in
392
+ self ? . imageAssets = PHFetchResult < PHAsset > ( )
393
+ }
394
+ log. debug ( " Access to photos is denied or not determined, showing the no permissions screen. " )
396
395
@unknown default :
397
396
log. debug ( " Unknown authorization status. " )
398
397
}
Original file line number Diff line number Diff line change @@ -110,14 +110,15 @@ struct ReactionImageView: View {
110
110
var isSentByCurrentUser : Bool
111
111
var backgroundColor : Color
112
112
113
- private var reactionColor : Color {
114
- isSentByCurrentUser ? colors. tintColor : Color ( colors. textLowEmphasis)
113
+ private var reactionColor : UIColor ? {
114
+ var colors = colors
115
+ return isSentByCurrentUser ? colors. reactionCurrentUserColor : colors. reactionOtherUserColor
115
116
}
116
117
117
118
var body : some View {
118
119
Image ( uiImage: image)
119
120
. resizable ( )
120
- . foregroundColor ( reactionColor)
121
+ . foregroundColor ( reactionColor != nil ? Color ( reactionColor! ) : nil )
121
122
. frame ( width: 16 , height: 16 )
122
123
. padding ( . all, 8 )
123
124
. background ( backgroundColor)
Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ public struct ColorPalette {
74
74
public lazy var messageOtherUserTextColor : UIColor = text
75
75
public lazy var quotedMessageBackgroundCurrentUser : UIColor = background8
76
76
public lazy var quotedMessageBackgroundOtherUser : UIColor = background8
77
+ public lazy var reactionCurrentUserColor : UIColor ? = UIColor ( tintColor)
78
+ public lazy var reactionOtherUserColor : UIColor ? = textLowEmphasis
77
79
}
78
80
79
81
// Those colors are default defined stream constants, which are fallback values if you don't implement your color theme.
You can’t perform that action at this time.
0 commit comments