Closed valiantwarrior closed 3 years ago
// ScheduleViewModel.kt private fun syncElapsedTimeWithDatabase(currentWorkoutOverview: WorkoutOverview) { if (currentWorkoutOverview.trackingStatus == TrackingStatus.TRACKING) { with(currentWorkoutOverview) { elapsedTimeMilli = System.currentTimeMillis() - startTimeMilli // <- timer sync problem!!! } _trackingJob.value?.let { deactivateTimer() } ?: activateTimer() } _elapsedTimeMilli.value = currentWorkoutOverview.elapsedTimeMilli }
Done