File tree Expand file tree Collapse file tree
domain/src/main/java/com/threegap/bitnagil/domain/routine Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package com.threegap.bitnagil.domain.routine.model
22
33data class RoutineToggleState (
4- val isCompleted : Boolean ,
54 val subRoutinesIsCompleted : List <Boolean >,
6- )
5+ ) {
6+ val isCompleted: Boolean
7+ get() = subRoutinesIsCompleted.all { it }
8+ }
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ class ToggleRoutineUseCase @Inject constructor() {
2121 val newSubRoutineStates = subRoutineStates.map { newIsCompleted }
2222
2323 return RoutineToggleState (
24- isCompleted = newIsCompleted,
2524 subRoutinesIsCompleted = newSubRoutineStates,
2625 )
2726 }
@@ -47,10 +46,7 @@ class ToggleRoutineUseCase @Inject constructor() {
4746 this [index] = newState
4847 }
4948
50- val allCompleted = newSubRoutineStates.all { it }
51-
5249 return RoutineToggleState (
53- isCompleted = allCompleted,
5450 subRoutinesIsCompleted = newSubRoutineStates,
5551 )
5652 }
You can’t perform that action at this time.
0 commit comments