Skip to content

Commit 7b56baf

Browse files
authored
Merge pull request #492 from Adamant-im/dev/trello.com/c/yFdWu00S
[trello.com/c/yFdWu00S] Fixed: reaction background color
2 parents 553708f + 35fa470 commit 7b56baf

File tree

4 files changed

+8
-26
lines changed

4 files changed

+8
-26
lines changed

Adamant/Modules/Chat/View/Subviews/ChatBaseMessage/ChatMessageCell.swift

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -172,10 +172,7 @@ final class ChatMessageCell: TextMessageCell, ChatModelView {
172172

173173
func updateOwnReaction() {
174174
ownReactionLabel.text = getReaction(for: model.address)
175-
ownReactionLabel.backgroundColor = model.backgroundColor.uiColor.mixin(
176-
infusion: .lightGray,
177-
alpha: 0.15
178-
)
175+
ownReactionLabel.backgroundColor = .adamant.pickedReactionBackground
179176
}
180177

181178
func updateOpponentReaction() {
@@ -206,10 +203,7 @@ final class ChatMessageCell: TextMessageCell, ChatModelView {
206203
}
207204

208205
opponentReactionLabel.attributedText = fullString
209-
opponentReactionLabel.backgroundColor = model.backgroundColor.uiColor.mixin(
210-
infusion: .lightGray,
211-
alpha: 0.15
212-
)
206+
opponentReactionLabel.backgroundColor = .adamant.pickedReactionBackground
213207
}
214208

215209
func getSenderPublicKeyInReaction(for senderAddress: String) -> String? {

Adamant/Modules/Chat/View/Subviews/ChatReply/ChatMessageReplyCell.swift

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,7 @@ final class ChatMessageReplyCell: MessageContentCell, ChatModelView {
250250

251251
func updateOwnReaction() {
252252
ownReactionLabel.text = getReaction(for: model.address)
253-
ownReactionLabel.backgroundColor = model.backgroundColor.uiColor.mixin(
254-
infusion: .lightGray,
255-
alpha: 0.15
256-
)
253+
ownReactionLabel.backgroundColor = .adamant.pickedReactionBackground
257254
}
258255

259256
func updateOpponentReaction() {
@@ -284,10 +281,7 @@ final class ChatMessageReplyCell: MessageContentCell, ChatModelView {
284281
}
285282

286283
opponentReactionLabel.attributedText = fullString
287-
opponentReactionLabel.backgroundColor = model.backgroundColor.uiColor.mixin(
288-
infusion: .lightGray,
289-
alpha: 0.15
290-
)
284+
opponentReactionLabel.backgroundColor = .adamant.pickedReactionBackground
291285
}
292286

293287
func getSenderPublicKeyInReaction(for senderAddress: String) -> String? {

Adamant/Modules/Chat/View/Subviews/ChatTransaction/Container/ChatTransactionContainerView.swift

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,7 @@ private extension ChatTransactionContainerView {
205205

206206
func updateOwnReaction() {
207207
ownReactionLabel.text = getReaction(for: model.address)
208-
ownReactionLabel.backgroundColor = model.content.backgroundColor.uiColor.mixin(
209-
infusion: .lightGray,
210-
alpha: 0.15
211-
)
208+
ownReactionLabel.backgroundColor = .adamant.pickedReactionBackground
212209
}
213210

214211
func updateOpponentReaction() {
@@ -239,10 +236,7 @@ private extension ChatTransactionContainerView {
239236
}
240237

241238
opponentReactionLabel.attributedText = fullString
242-
opponentReactionLabel.backgroundColor = model.content.backgroundColor.uiColor.mixin(
243-
infusion: .lightGray,
244-
alpha: 0.15
245-
)
239+
opponentReactionLabel.backgroundColor = .adamant.pickedReactionBackground
246240
}
247241

248242
func getSenderPublicKeyInReaction(for senderAddress: String) -> String? {

CommonKit/Sources/CommonKit/Helpers/UIHelpers/UIColor+adamant.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ extension UIColor {
119119

120120
/// Picked reaction background color
121121
public static var pickedReactionBackground: UIColor {
122-
let colorWhiteTheme = UIColor(red: 0.88, green: 0.88, blue: 0.88, alpha: 1.0)
123-
let colorDarkTheme = UIColor(red: 0.278, green: 0.278, blue: 0.278, alpha: 1.0)
122+
let colorWhiteTheme = UIColor(red: 0.92, green: 0.925, blue: 0.93, alpha: 0.85)
123+
let colorDarkTheme = UIColor(red: 0.329, green: 0.329, blue: 0.329, alpha: 1.0)
124124
return returnColorByTheme(colorWhiteTheme: colorWhiteTheme, colorDarkTheme: colorDarkTheme)
125125
}
126126

0 commit comments

Comments
 (0)