From efbec560e2eed41b582e914fbb1707ccfc698fcf Mon Sep 17 00:00:00 2001 From: Jacin Woo <41990342+Wujiaxuan007@users.noreply.github.com> Date: Fri, 3 Jan 2025 02:12:43 +0800 Subject: [PATCH] fix(MultiProgressBarAnimation.kt): startTime (#246) ## Fix: Correct startTime Initialization in ProgressTaskImpl ### Summary This PR fixes an issue where startTime was incorrectly set to pauseTime, ensuring accurate task progress tracking and speed estimation. ### Changes Updated: ```kotlin val startTime = status.pauseTime ?: now ``` to: ```kotlin val startTime = status.startTime ?: now ``` --- .../mordant/animation/progress/MultiProgressBarAnimation.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mordant/src/commonMain/kotlin/com/github/ajalt/mordant/animation/progress/MultiProgressBarAnimation.kt b/mordant/src/commonMain/kotlin/com/github/ajalt/mordant/animation/progress/MultiProgressBarAnimation.kt index bbb69364..ae51debf 100644 --- a/mordant/src/commonMain/kotlin/com/github/ajalt/mordant/animation/progress/MultiProgressBarAnimation.kt +++ b/mordant/src/commonMain/kotlin/com/github/ajalt/mordant/animation/progress/MultiProgressBarAnimation.kt @@ -180,7 +180,7 @@ private class ProgressTaskImpl( ) val total = scope.total - val startTime = status.pauseTime ?: now + val startTime = status.startTime ?: now val finishTime = status.finishTime ?: now val pauseTime = status.pauseTime ?: now