diff --git a/app/src/main/java/com/practice/getup/data/db/dto/WorkoutDto.kt b/app/src/main/java/com/practice/getup/data/db/dto/WorkoutDto.kt index 8ec9178..6e2ef10 100644 --- a/app/src/main/java/com/practice/getup/data/db/dto/WorkoutDto.kt +++ b/app/src/main/java/com/practice/getup/data/db/dto/WorkoutDto.kt @@ -11,11 +11,11 @@ import kotlinx.parcelize.Parcelize @Entity(tableName = "workout") data class WorkoutDto( @PrimaryKey(autoGenerate = true) val id: Int = 0, - @NonNull @ColumnInfo val name: String, - @NonNull @ColumnInfo("preparing_time") val preparingTime: Int, - @NonNull @ColumnInfo("work_time") val workTime: Int, - @NonNull @ColumnInfo("rest_time") val restTime: Int, - @NonNull @ColumnInfo("number_of_sets") val numberOfSets: Int + @ColumnInfo val name: String, + @ColumnInfo("preparing_time") val preparingTime: Int, + @ColumnInfo("work_time") val workTime: Int, + @ColumnInfo("rest_time") val restTime: Int, + @ColumnInfo("number_of_sets") val numberOfSets: Int ): Parcelable { companion object { diff --git a/app/src/main/java/com/practice/getup/data/timer/dto/StageDto.kt b/app/src/main/java/com/practice/getup/data/timer/dto/StageDto.kt index b3ca551..6c89a72 100644 --- a/app/src/main/java/com/practice/getup/data/timer/dto/StageDto.kt +++ b/app/src/main/java/com/practice/getup/data/timer/dto/StageDto.kt @@ -1,6 +1,5 @@ package com.practice.getup.data.timer.dto -import com.practice.getup.presentation.timer.utils.UiText data class StageDto( val id: String, diff --git a/app/src/main/java/com/practice/getup/domain/repositories/StorageRepository.kt b/app/src/main/java/com/practice/getup/domain/repositories/StorageRepository.kt index 69a9566..54b99ed 100644 --- a/app/src/main/java/com/practice/getup/domain/repositories/StorageRepository.kt +++ b/app/src/main/java/com/practice/getup/domain/repositories/StorageRepository.kt @@ -6,14 +6,9 @@ import kotlinx.coroutines.flow.Flow interface StorageRepository { suspend fun addNewWorkout(workout: Workout) - suspend fun deleteAllWorkouts() - suspend fun deleteWorkout(workout: Workout) - fun getAllWorkouts(): Flow> - suspend fun getWorkout(id: Int): Workout - suspend fun updateWorkout(workout: Workout) } \ No newline at end of file diff --git a/app/src/main/res/navigation/nav_graph.xml b/app/src/main/res/navigation/nav_graph.xml index e0627ca..fde534f 100644 --- a/app/src/main/res/navigation/nav_graph.xml +++ b/app/src/main/res/navigation/nav_graph.xml @@ -30,7 +30,9 @@ app:argType="com.practice.getup.domain.models.Workout" /> + app:destination="@id/mainFragment" + app:popUpTo="@id/mainFragment" + app:popUpToInclusive="true" /> + app:destination="@id/mainFragment" + app:popUpTo="@id/mainFragment" + app:popUpToInclusive="true" />