Skip to content

Commit

Permalink
Fixed lifecycle aware scope usage
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaishnav Anil committed Feb 14, 2024
1 parent 01b0c6d commit b2cbc47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion adapt/src/main/java/io/github/vshnv/adapt/Adapt.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ fun <T: Any> adapt(setup: AdaptScope<T>.() -> Unit): AdaptAdapter<T> {
return adaptScope.buildAdapter()
}

fun <T: Any> adapt(lifecycleOwner: LifecycleOwner, setup: AdaptScope<T>.() -> Unit): AdaptAdapter<T> {
fun <T: Any> adapt(lifecycleOwner: LifecycleOwner, setup: LifecycleAwareAdaptScope<T>.() -> Unit): AdaptAdapter<T> {
val adaptScope = LifecycleAwareCollectingAdaptScope<T>(lifecycleOwner)
adaptScope.setup()
return adaptScope.buildAdapter()
Expand Down

0 comments on commit b2cbc47

Please sign in to comment.