Skip to content

Commit 9fe008f

Browse files
authored
Merge pull request #43 from OlegEremenko991/develop/updateChatIncomingColor
Поменял цвет полученного сообщения с зеленого на серый для большего контраста
2 parents 3339cac + 0e99813 commit 9fe008f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

SwiftUI-WorkoutApp/Models/MessageType.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ import UIKit.UIColor
44
enum MessageType {
55
case incoming, sent
66

7-
var color: UIColor { self == .incoming ? .systemGreen : .systemBlue }
7+
var color: UIColor { self == .incoming ? .systemGray : .systemBlue }
88
}

SwiftUI-WorkoutApp/Screens/Messages/DialogView/ChatBubble.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ struct ChatBubble_Previews: PreviewProvider {
143143
.opacity(0.75)
144144
}
145145
.foregroundColor(.white)
146-
.background(.blue)
146+
.background(Color(uiColor: MessageType.incoming.color))
147147
}
148148
ChatBubble(.sent) {
149149
VStack(alignment: .trailing, spacing: 8) {
@@ -156,7 +156,7 @@ struct ChatBubble_Previews: PreviewProvider {
156156
.opacity(0.75)
157157
}
158158
.foregroundColor(.white)
159-
.background(.green)
159+
.background(Color(uiColor: MessageType.sent.color))
160160
}
161161
}
162162
.textSelection(.enabled)

0 commit comments

Comments
 (0)