Skip to content

Commit

Permalink
Merge pull request #801 from arkivanov/update-essenty-and-compose
Browse files Browse the repository at this point in the history
Updated Essenty to 2.2.0 and Compose to 1.7.0
  • Loading branch information
arkivanov authored Oct 23, 2024
2 parents 6dcca39 + 713126d commit 806deeb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions deps.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

decompose = "3.2.0-beta03"
kotlin = "2.0.20"
essenty = "2.2.0-beta01"
essenty = "2.2.0"
reaktive = "1.2.3"
junit = "4.13.2"
jetbrainsCompose = "1.7.0-rc01"
jetbrainsCompose = "1.7.0"
jetbrainsKotlinWrappers = "1.0.0-pre.608"
jetbrainsKotlinxCoroutines = "1.8.1"
jetbrainsKotlinxSerialization = "1.6.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import com.arkivanov.decompose.value.Value
import com.arkivanov.decompose.value.operator.map
import com.arkivanov.decompose.value.update
import com.arkivanov.essenty.instancekeeper.InstanceKeeper
import com.arkivanov.essenty.instancekeeper.getOrCreate
import com.arkivanov.essenty.instancekeeper.retainedInstance
import com.arkivanov.sample.shared.counters.counter.CounterComponent.Model
import com.arkivanov.sample.shared.dialog.DefaultDialogComponent
import com.arkivanov.sample.shared.dialog.DialogComponent
Expand All @@ -31,7 +31,7 @@ internal class DefaultCounterComponent(
) : CounterComponent, ComponentContext by componentContext {

private val handler =
instanceKeeper.getOrCreate(KEY_STATE) {
retainedInstance {
Handler(
initialState = stateKeeper.consume(key = KEY_STATE, strategy = State.serializer()) ?: State(),
tickScheduler = tickScheduler,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import com.arkivanov.decompose.value.Value
import com.arkivanov.decompose.value.operator.map
import com.arkivanov.decompose.value.update
import com.arkivanov.essenty.instancekeeper.InstanceKeeper
import com.arkivanov.essenty.instancekeeper.getOrCreate
import com.arkivanov.essenty.instancekeeper.retainedInstance
import com.arkivanov.essenty.lifecycle.subscribe
import com.arkivanov.sample.shared.ImageResourceId
import com.arkivanov.sample.shared.customnavigation.KittenComponent.Model
Expand All @@ -22,7 +22,7 @@ class DefaultKittenComponent(
) : KittenComponent, ComponentContext by componentContext {

private val handler =
instanceKeeper.getOrCreate(KEY_STATE) {
retainedInstance {
Handler(initialState = stateKeeper.consume(key = KEY_STATE, strategy = State.serializer()) ?: State())
}

Expand Down

0 comments on commit 806deeb

Please sign in to comment.