Skip to content

Commit 0162b29

Browse files
committed
onComplete should actually be onCompleted in RxJava 1.x
1 parent 106bbad commit 0162b29

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/kotlin/rx/lang/kotlin/subscribers.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ private val onCompleteStub: () -> Unit = {}
1515
fun <T : Any> Observable<T>.subscribeBy(
1616
onNext: (T) -> Unit = onNextStub,
1717
onError: (Throwable) -> Unit = onErrorStub,
18-
onComplete: () -> Unit = onCompleteStub
19-
): Subscription = subscribe(onNext, onError, onComplete)
18+
onCompleted: () -> Unit = onCompleteStub
19+
): Subscription = subscribe(onNext, onError, onCompleted)
2020

2121
/**
2222
* Overloaded subscribe function that allow passing named parameters
@@ -31,5 +31,5 @@ fun <T : Any> Single<T>.subscribeBy(
3131
*/
3232
fun Completable.subscribeBy(
3333
onError: (Throwable) -> Unit = onErrorStub,
34-
onComplete: () -> Unit = onCompleteStub
35-
): Subscription = subscribe(onComplete, onError)
34+
onCompleted: () -> Unit = onCompleteStub
35+
): Subscription = subscribe(onCompleted, onError)

0 commit comments

Comments
 (0)