MESSENGER-4179 send button wrong color

This commit is contained in:
Arnfried Griesert
2023-03-02 14:50:31 +00:00
parent b1c85b9a24
commit c94184f74c
32 changed files with 110 additions and 17 deletions
@@ -171,7 +171,7 @@ struct Composer: View {
if viewModel.viewState.sendMode == .edit {
Image(Asset.Images.saveIcon.name)
} else {
Image(Asset.Images.sendIcon.name)
Image(BWIBuildSettings.shared.bwiEnableBuMUI ? Asset.Images.sendIconBum.name : Asset.Images.sendIcon.name)
}
}
.frame(width: 36, height: 36)
@@ -69,6 +69,7 @@ struct PollEditForm: View {
viewModel.send(viewAction: .addAnswerOption)
}
}
.foregroundColor(Color(ThemeService.shared().theme.tintColor))
.disabled(!viewModel.viewState.addAnswerOptionButtonEnabled)
Spacer()
@@ -45,7 +45,13 @@ private struct PollEditFormTypeButton: View {
selectedType = type
} label: {
HStack(alignment: .top, spacing: 8.0) {
Image(uiImage: selectionImage)
// bwi: 4179
if type == selectedType {
Image(uiImage: Asset.Images.pollTypeCheckboxSelected.image)
.foregroundColor(Color(ThemeService.shared().theme.tintColor))
} else {
Image(uiImage: Asset.Images.pollTypeCheckboxDefault.image)
}
VStack(alignment: .leading, spacing: 2) {
Text(title)
@@ -63,6 +63,7 @@ struct TimelinePollAnswerOptionButton: View {
HStack(spacing: 6) {
if poll.closed, answerOption.winner {
Image(uiImage: Asset.Images.pollWinnerIcon.image)
.foregroundColor(Color(ThemeService.shared().theme.tintColor))
}
if poll.shouldDiscloseResults {
@@ -85,9 +86,9 @@ struct TimelinePollAnswerOptionButton: View {
var borderAccentColor: Color {
guard !poll.closed else {
return (answerOption.winner ? theme.colors.accent : theme.colors.quinaryContent)
return (answerOption.winner ? Color(ThemeService.shared().theme.tintColor) : theme.colors.quinaryContent)
}
return answerOption.selected ? theme.colors.accent : theme.colors.quinaryContent
}