Skip to content

Commit

Permalink
Update decompose to v2.2.0-compose-experimental-beta02
Browse files Browse the repository at this point in the history
  • Loading branch information
msasikanth committed Nov 27, 2023
1 parent c95166a commit b79cd34
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ napier = "2.6.1"
kotlinx_coroutines = "1.7.3"
kotlinx_date_time = "0.4.1"
kotlinx_immutable_collections = "0.3.6"
decompose = "2.1.4-compose-experimental"
decompose = "2.2.0-compose-experimental-beta02"
essenty = "1.3.0"
androidx_activity = "1.8.1"
androidx_appcompat = "1.6.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ import com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.Stac
import com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.StackAnimator
import com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.fade
import com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.plus
import com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.predictiveBackAnimation
import com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.predictiveback.predictiveBackAnimatable
import com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.predictiveback.predictiveBackAnimation
import com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.stackAnimation
import com.arkivanov.decompose.extensions.compose.jetbrains.stack.animation.stackAnimator
import com.arkivanov.essenty.backhandler.BackEvent
Expand All @@ -45,8 +46,13 @@ internal actual fun <C : Any, T : Any> backAnimation(
predictiveBackAnimation(
backHandler = backHandler,
animation = stackAnimation(fade() + scale()),
enterModifier = { progress, _ -> Modifier.enterModifier(progress) },
exitModifier = { progress, edge -> Modifier.exitModifier(progress, edge) },
selector = { initialBackEvent, _, _ ->
predictiveBackAnimatable(
initialBackEvent = initialBackEvent,
enterModifier = { progress, _ -> Modifier.enterModifier(progress) },
exitModifier = { progress, edge -> Modifier.exitModifier(progress, edge) },
)
},
onBack = onBack,
)

Expand Down

0 comments on commit b79cd34

Please sign in to comment.