Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
DevSrSouza committed May 21, 2024
1 parent c9a3c07 commit 3cce9b4
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import cafe.adriel.voyager.core.screen.Screen
import cafe.adriel.voyager.core.stack.StackEvent
import cafe.adriel.voyager.navigator.Navigator


@ExperimentalVoyagerApi
public interface ScreenTransition {

Expand Down Expand Up @@ -70,21 +69,21 @@ public fun ScreenTransition(

val isPop = navigator.lastEvent == StackEvent.Pop

val screenEnterTransition = if(isPop) {
val screenEnterTransition = if (isPop) {
(targetState as? ScreenTransition)?.enter()
} else {
(targetState as? ScreenTransition)?.enter()
}

val screenExitTransition = if(isPop) {
val screenExitTransition = if (isPop) {
(initialState as? ScreenTransition)?.exit()
} else {
(initialState as? ScreenTransition)?.exit()
}

if(screenExitTransition != null || screenEnterTransition != null) {
if (screenExitTransition != null || screenEnterTransition != null) {
(screenEnterTransition ?: contentTransform.targetContentEnter) togetherWith
(screenExitTransition ?: contentTransform.initialContentExit)
(screenExitTransition ?: contentTransform.initialContentExit)
} else {
contentTransform
}
Expand Down

0 comments on commit 3cce9b4

Please sign in to comment.