Skip to content

Commit 19a624a

Browse files
committed
fix activity with no records showing series calendar from 1970
1 parent 29d0480 commit 19a624a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

features/feature_statistics_detail/src/main/java/com/example/util/simpletimetracker/feature_statistics_detail/interactor/StatisticsDetailStreaksInteractor.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,9 @@ class StatisticsDetailStreaksInteractor @Inject constructor(
267267
val durations = getRanges(
268268
range = if (range.timeStarted == 0L && range.timeEnded == 0L) {
269269
Range(
270-
timeStarted = records.minByOrNull { it.timeStarted }?.timeStarted ?: 0,
270+
timeStarted = records.minByOrNull { it.timeStarted }
271+
?.timeStarted
272+
?: System.currentTimeMillis(),
271273
timeEnded = System.currentTimeMillis(),
272274
)
273275
} else {

0 commit comments

Comments
 (0)