Skip to content

Commit

Permalink
use compose navigation beta for type safe
Browse files Browse the repository at this point in the history
  • Loading branch information
sirambd committed Jul 19, 2024
1 parent 1a1bd54 commit 88c77b3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,24 @@ package com.infomaniak.swisstransfer.ui.navigation
* Sealed class representing the navigation arguments for the main navigation flow.
*/
sealed class MainNavigation private constructor() : NavigationArgs() {
data object SentNavArgs : MainNavigation()
data object ReceivedNavArgs : MainNavigation()
data class TransferDetailsNavArgs(val transferId: Int) : MainNavigation()
data object Sent : MainNavigation()
data object Received : MainNavigation()
data class TransferDetails(val transferId: Int) : MainNavigation()

data object SettingsNavArgs : MainNavigation()
data object Settings : MainNavigation()
}

/**
* Sealed class representing the navigation arguments for the new transfer flow.
*/
sealed class NewTransferNavigation private constructor() : NavigationArgs() {
data object ImportFilesNavArgs : NavigationArgs()
data object TransferTypeNavArgs : NavigationArgs()
data object TransferOptionsNavArgs : NavigationArgs()
data object ValidateUserEmailNavArgs : NavigationArgs()
data object ImportFiles : NavigationArgs()
data object TransferType : NavigationArgs()
data object TransferOptions : NavigationArgs()
data object ValidateUserEmail : NavigationArgs()

data object UploadProgressNavArgs : NavigationArgs()
data object UploadSuccessNavArgs : NavigationArgs()
data object UploadProgress : NavigationArgs()
data object UploadSuccess : NavigationArgs()
}

/**
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ junit = "4.13.2"
junitVersion = "1.2.1"
kotlin = "2.0.0"
lifecycleRuntimeKtx = "2.8.3"
navigation = "2.7.7"
navigation = "2.8.0-beta05"

[libraries]
androidx-activity-compose = { group = "androidx.activity", name = "activity-compose", version.ref = "activityCompose" }
Expand Down

0 comments on commit 88c77b3

Please sign in to comment.