We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1bbce31 commit 17dc5b2Copy full SHA for 17dc5b2
presentation/src/main/java/com/whyranoid/presentation/running/RunningDataManager.kt
@@ -84,7 +84,7 @@ class RunningDataManager @Inject constructor() {
84
distance
85
)
86
val newTotalDistance = prevRunningData.totalDistance + distance.first()
87
- val newPace = newTotalDistance / newRunningTime
+ val newPace = if (newRunningTime == 0) 0.0 else newTotalDistance / newRunningTime
88
val newRunningPositionList =
89
prevRunningData.runningPositionList.toList().map { it.toMutableList() }
90
.also { it[it.lastIndex].add(runningPosition) }
0 commit comments