Skip to content

Commit

Permalink
Merge pull request #181 from arkivanov/fixed-property-not-resolved-crash
Browse files Browse the repository at this point in the history
Fixed "Property ... not resolved in class ..." crash
  • Loading branch information
arkivanov authored Oct 29, 2024
2 parents 2590da6 + e1dfa22 commit afdcd68
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ inline fun <T, S : Any> StateKeeper.saveable(
crossinline init: (savedState: S?) -> T,
): PropertyDelegateProvider<Any?, ReadOnlyProperty<Any?, T>> =
PropertyDelegateProvider { _, property ->
val stateKey = key ?: "SAVEABLE_HOLDER_{$property.name}"
val stateKey = key ?: "SAVEABLE_HOLDER_${property.name}"
val result = init(consume(key = stateKey, strategy = serializer))
register(key = stateKey, strategy = serializer) { state(result) }
ReadOnlyProperty { _, _ -> result }
Expand Down

0 comments on commit afdcd68

Please sign in to comment.