Skip to content

Commit

Permalink
Fixed "Property ... not resolved in class ..." crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Arkadii Ivanov committed Oct 29, 2024
1 parent bc67da4 commit e1dfa22
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 e1dfa22

Please sign in to comment.