Fix the touch area size for the voice message button. (#2174)

This commit is contained in:
Nicolas Mauri 2023-11-28 10:21:42 +01:00 committed by GitHub
parent 45e4cbccee
commit 7cc5990711
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -53,7 +53,6 @@ struct VoiceMessageButton: View {
.animation(nil, value: state)
.buttonStyle(VoiceMessageButtonStyle())
.disabled(state == .loading)
.background(Circle().foregroundColor(.compound.bgCanvasDefault))
.accessibilityLabel(accessibilityLabel)
}
@ -92,6 +91,10 @@ private struct VoiceMessageButtonStyle: ButtonStyle {
func makeBody(configuration: Configuration) -> some View {
configuration.label
.foregroundColor(isEnabled ? .compound.textSecondary.opacity(configuration.isPressed ? 0.6 : 1) : .compound.iconDisabled)
.background(
Circle()
.foregroundColor(configuration.isPressed ? .compound.bgSubtlePrimary : .compound.bgCanvasDefault)
)
}
}

1
changelog.d/2038.bugfix Normal file
View File

@ -0,0 +1 @@
Fix the touch area size for the voice message button.