Florian
09/02/2021, 12:42 PMsuspend fun List<TaskStatistic>.getCurrentCompletedStreak(): Int =
withContext(Dispatchers.Default) {
var currentStreak = 0
for (statistic in this@getCurrentCompletedStreak.reversed()) {
if (!statistic.taskCompleted) break
currentStreak++
}
currentStreak
}
Richard Gomez
09/02/2021, 1:07 PMcoroutineScope { }
to inherit the calling scope/context
2. This is something that multiple receivers will alleviateFlorian
09/02/2021, 1:11 PMDominaezzz
09/02/2021, 3:24 PMindexOf { }
operator btw.Florian
09/02/2021, 3:56 PMDominaezzz
09/02/2021, 3:57 PMFlorian
09/02/2021, 8:35 PMeygraber
09/03/2021, 12:49 AMFlorian
09/03/2021, 2:16 PM