Skip to content

Commit

Permalink
Ensure we're checking if the speed value is unusual
Browse files Browse the repository at this point in the history
Not the converted value in kmh, otherwise every mph value will be odd
  • Loading branch information
peternewman authored and westnordost committed Nov 10, 2019
1 parent 171bdfd commit 095eeb5
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -109,7 +109,7 @@ class AddMaxSpeedForm : AbstractQuestFormAnswerFragment<MaxSpeedAnswer>() {

private fun userSelectedUnusualSpeed(): Boolean {
val kmh = getSpeedFromInput()?.toKmh() ?: return false
return kmh > 140 || kmh > 20 && kmh % 5 != 0
return kmh > 140 || kmh > 20 && getSpeedFromInput()?.toValue() % 5 != 0
}

private fun switchToAdvisorySpeedLimit() {
Expand Down

0 comments on commit 095eeb5

Please sign in to comment.