From 7b009d06996b1ab25bc181af2302ea2a70a94f4b Mon Sep 17 00:00:00 2001 From: Shaishav Gandhi Date: Sun, 5 Aug 2018 19:04:13 -0700 Subject: [PATCH] Make Android lifecycle extensions return ScopeProvider (#240) **Description**: Make Android Lifecycle Extensions return `ScopeProvider`. **Related issue(s)**: #239 --- .../lifecycle/AutoDisposeAndroidLifecycle.kt | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/android/autodispose-android-archcomponents-ktx/src/main/kotlin/com/uber/autodispose/android/lifecycle/AutoDisposeAndroidLifecycle.kt b/android/autodispose-android-archcomponents-ktx/src/main/kotlin/com/uber/autodispose/android/lifecycle/AutoDisposeAndroidLifecycle.kt index d25c444b2..f68823c05 100644 --- a/android/autodispose-android-archcomponents-ktx/src/main/kotlin/com/uber/autodispose/android/lifecycle/AutoDisposeAndroidLifecycle.kt +++ b/android/autodispose-android-archcomponents-ktx/src/main/kotlin/com/uber/autodispose/android/lifecycle/AutoDisposeAndroidLifecycle.kt @@ -21,59 +21,59 @@ package com.uber.autodispose.android.lifecycle import android.arch.lifecycle.Lifecycle import android.arch.lifecycle.Lifecycle.Event import android.arch.lifecycle.LifecycleOwner +import com.uber.autodispose.ScopeProvider import com.uber.autodispose.lifecycle.CorrespondingEventsFunction -import com.uber.autodispose.lifecycle.LifecycleScopeProvider import io.reactivex.annotations.CheckReturnValue /** - * Extension that returns a [LifecycleScopeProvider] for this [LifecycleOwner]. + * Extension that returns a [ScopeProvider] for this [LifecycleOwner]. */ @CheckReturnValue -inline fun LifecycleOwner.scope(): LifecycleScopeProvider<*> = AndroidLifecycleScopeProvider.from( +inline fun LifecycleOwner.scope(): ScopeProvider = AndroidLifecycleScopeProvider.from( this) /** - * Extension that returns a [LifecycleScopeProvider] for this [LifecycleOwner]. + * Extension that returns a [ScopeProvider] for this [LifecycleOwner]. * * @param untilEvent the event until the scope is valid. */ @CheckReturnValue inline fun LifecycleOwner.scope( - untilEvent: Lifecycle.Event): LifecycleScopeProvider<*> = AndroidLifecycleScopeProvider.from( + untilEvent: Lifecycle.Event): ScopeProvider = AndroidLifecycleScopeProvider.from( this, untilEvent) /** - * Extension that returns a [LifecycleScopeProvider] for this [LifecycleOwner]. + * Extension that returns a [ScopeProvider] for this [LifecycleOwner]. * * @param boundaryResolver function that resolves the event boundary. */ @CheckReturnValue inline fun LifecycleOwner.scope( - boundaryResolver: CorrespondingEventsFunction): LifecycleScopeProvider<*> = AndroidLifecycleScopeProvider.from( + boundaryResolver: CorrespondingEventsFunction): ScopeProvider = AndroidLifecycleScopeProvider.from( this, boundaryResolver) /** - * Extension that returns a [LifecycleScopeProvider] for this [Lifecycle]. + * Extension that returns a [ScopeProvider] for this [Lifecycle]. */ @CheckReturnValue -inline fun Lifecycle.scope(): LifecycleScopeProvider<*> = AndroidLifecycleScopeProvider.from(this) +inline fun Lifecycle.scope(): ScopeProvider = AndroidLifecycleScopeProvider.from(this) /** - * Extension that returns a [LifecycleScopeProvider] for this [Lifecycle]. + * Extension that returns a [ScopeProvider] for this [Lifecycle]. * * @param untilEvent the event until the scope is valid. */ @CheckReturnValue inline fun Lifecycle.scope( - untilEvent: Lifecycle.Event): LifecycleScopeProvider<*> = AndroidLifecycleScopeProvider.from( + untilEvent: Lifecycle.Event): ScopeProvider = AndroidLifecycleScopeProvider.from( this, untilEvent) /** - * Extension that returns a [LifecycleScopeProvider] for this [Lifecycle]. + * Extension that returns a [ScopeProvider] for this [Lifecycle]. * * @param boundaryResolver function that resolves the event boundary. */ @CheckReturnValue inline fun Lifecycle.scope( - boundaryResolver: CorrespondingEventsFunction): LifecycleScopeProvider<*> = AndroidLifecycleScopeProvider.from( + boundaryResolver: CorrespondingEventsFunction): ScopeProvider = AndroidLifecycleScopeProvider.from( this, boundaryResolver)