Skip to content

Commit

Permalink
10.07.2023
Browse files Browse the repository at this point in the history
-исправлен баг с back stack, теперь с главного экрана при нажати назад мы больше не возвращаемся в другие фрагменты

Tasks:
-баг, не переводятся названия стадий тренировки

-сделать выбор при нажатии назад(отменить тренировку или нет) поменять кнопку старт на главной с старт на континью
  • Loading branch information
alexxk2 committed Jul 10, 2023
1 parent 4c07273 commit 198b641
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
10 changes: 5 additions & 5 deletions app/src/main/java/com/practice/getup/data/db/dto/WorkoutDto.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<List<Workout>>

suspend fun getWorkout(id: Int): Workout

suspend fun updateWorkout(workout: Workout)
}
8 changes: 6 additions & 2 deletions app/src/main/res/navigation/nav_graph.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
app:argType="com.practice.getup.domain.models.Workout" />
<action
android:id="@+id/action_timerFragment_to_mainFragment"
app:destination="@id/mainFragment" />
app:destination="@id/mainFragment"
app:popUpTo="@id/mainFragment"
app:popUpToInclusive="true" />
</fragment>
<fragment
android:id="@+id/optionsFragment"
Expand All @@ -39,7 +41,9 @@
tools:layout="@layout/fragment_options" >
<action
android:id="@+id/action_optionsFragment_to_mainFragment"
app:destination="@id/mainFragment" />
app:destination="@id/mainFragment"
app:popUpTo="@id/mainFragment"
app:popUpToInclusive="true" />
<argument
android:name="id"
app:argType="integer"
Expand Down

0 comments on commit 198b641

Please sign in to comment.