Skip to content

Commit

Permalink
fix compilation after ScreenLifecycleStore changes
Browse files Browse the repository at this point in the history
  • Loading branch information
DevSrSouza committed Dec 9, 2023
1 parent 2a8c82f commit 774cbc1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ public class AndroidScreenLifecycleOwner private constructor() :
Lifecycle.Event.ON_DESTROY
)
public fun get(screen: Screen): ScreenLifecycleOwner {
return ScreenLifecycleStore.register(screen) { AndroidScreenLifecycleOwner() }
return ScreenLifecycleStore.get(screen) { AndroidScreenLifecycleOwner() }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public object ScreenLifecycleStore {
@Deprecated(
message = "Use `get` instead. Will be removed in 1.1.0.",
replaceWith = ReplaceWith("ScreenLifecycleStore.get<T>(screen, factory)"),
level = DeprecationLevel.HIDDEN,
level = DeprecationLevel.HIDDEN
)
public inline fun <reified T : ScreenDisposable> register(
screen: Screen,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class ScreenContext(
internal var disposeCallback: () -> Unit = {}

internal fun onRegistryScope() {
ScreenLifecycleStore.register(screen) {
ScreenLifecycleStore.get(screen) {
ScreenScopeLifecycleOwner(disposeCallback)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public inline fun <reified T : ScreenModel> Screen.rememberScreenModel(
crossinline factory: @DisallowComposableCalls () -> T
): T {
val screenModelStore = remember(this) {
ScreenLifecycleStore.register(this) { ScreenModelStore }
ScreenLifecycleStore.get(this) { ScreenModelStore }
}
return remember(screenModelStore.getKey<T>(this, tag)) {
screenModelStore.getOrPut(this, tag, factory)
Expand Down

0 comments on commit 774cbc1

Please sign in to comment.