fix iOS swipe side colors
This commit is contained in:
@@ -256,18 +256,18 @@ struct RoundView: View {
|
|||||||
let isDraggingLeft = dragOffset.width < -dragThreshold
|
let isDraggingLeft = dragOffset.width < -dragThreshold
|
||||||
|
|
||||||
HStack(spacing: 0) {
|
HStack(spacing: 0) {
|
||||||
sideTint(
|
|
||||||
title: sortedOutcomes(for: round).dropFirst().first.map(outcomeTitle) ?? localization.string(for: "round.no"),
|
|
||||||
subtitle: localization.string(for: "round.swipe_left"),
|
|
||||||
color: .red,
|
|
||||||
opacity: isDraggingLeft ? min(abs(dragOffset.width) / 240.0, 0.95) : 0
|
|
||||||
)
|
|
||||||
sideTint(
|
sideTint(
|
||||||
title: sortedOutcomes(for: round).first.map(outcomeTitle) ?? localization.string(for: "round.yes"),
|
title: sortedOutcomes(for: round).first.map(outcomeTitle) ?? localization.string(for: "round.yes"),
|
||||||
subtitle: localization.string(for: "round.swipe_right"),
|
subtitle: localization.string(for: "round.swipe_right"),
|
||||||
color: HermesTheme.positive,
|
color: HermesTheme.positive,
|
||||||
opacity: isDraggingRight ? min(abs(dragOffset.width) / 240.0, 0.95) : 0
|
opacity: isDraggingRight ? min(abs(dragOffset.width) / 240.0, 0.95) : 0
|
||||||
)
|
)
|
||||||
|
sideTint(
|
||||||
|
title: sortedOutcomes(for: round).dropFirst().first.map(outcomeTitle) ?? localization.string(for: "round.no"),
|
||||||
|
subtitle: localization.string(for: "round.swipe_left"),
|
||||||
|
color: .red,
|
||||||
|
opacity: isDraggingLeft ? min(abs(dragOffset.width) / 240.0, 0.95) : 0
|
||||||
|
)
|
||||||
}
|
}
|
||||||
.ignoresSafeArea()
|
.ignoresSafeArea()
|
||||||
.allowsHitTesting(false)
|
.allowsHitTesting(false)
|
||||||
|
|||||||
Reference in New Issue
Block a user