Skip to content

Commit

Permalink
Use the default on Android too
Browse files Browse the repository at this point in the history
  • Loading branch information
Antoine Robiez committed Apr 16, 2024
1 parent e7dcb85 commit d672f15
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.androidmakers.ui

import moe.tlaster.precompose.navigation.transition.NavTransition

actual val defaultTransition: NavTransition = NavTransition()
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.androidmakers.ui

import androidx.compose.animation.slideInHorizontally
import androidx.compose.animation.slideOutHorizontally
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.staticCompositionLocalOf
Expand Down Expand Up @@ -114,13 +112,7 @@ private fun MainNavHost(
}
}

private val defaultTransition = NavTransition(
createTransition = slideInHorizontally { it },
pauseTransition = slideOutHorizontally { -it / 4 },
destroyTransition = slideOutHorizontally { it },
resumeTransition = slideInHorizontally { -it / 4 },
exitTargetContentZIndex = 1f
)
expect val defaultTransition: NavTransition

expect class PlatformContext

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.androidmakers.ui

import androidx.compose.animation.slideInHorizontally
import androidx.compose.animation.slideOutHorizontally
import moe.tlaster.precompose.navigation.transition.NavTransition

actual val defaultTransition: NavTransition = NavTransition(
createTransition = slideInHorizontally { it },
pauseTransition = slideOutHorizontally { -it / 4 },
destroyTransition = slideOutHorizontally { it },
resumeTransition = slideInHorizontally { -it / 4 },
exitTargetContentZIndex = 1f
)

0 comments on commit d672f15

Please sign in to comment.