diff --git a/build.gradle b/build.gradle index 1c137b5..a26aec3 100644 --- a/build.gradle +++ b/build.gradle @@ -13,7 +13,7 @@ buildscript { project.ext { bintrayUser = project.hasProperty('BINTRAY_USER') ? project.property('BINTRAY_USER') : "" bintrayKey = project.hasProperty('BINTRAY_KEY') ? project.property('BINTRAY_KEY') : "" - reductorVersion = '0.9.0' + reductorVersion = '0.9.1' } diff --git a/rx-store/build.gradle b/rx-store/build.gradle index 8dbbeb4..eb7a899 100644 --- a/rx-store/build.gradle +++ b/rx-store/build.gradle @@ -5,5 +5,5 @@ apply from: '../gradle/publishing.gradle' dependencies { retrolambdaConfig 'net.orfjackal.retrolambda:retrolambda:2.3.0' compile project(':lib') - compile 'io.reactivex:rxjava:1.1.9' + compile 'io.reactivex:rxjava:1.2.1' } diff --git a/rx-store/gradle.properties b/rx-store/gradle.properties index 09f2a3e..96da04b 100644 --- a/rx-store/gradle.properties +++ b/rx-store/gradle.properties @@ -1,18 +1,2 @@ -# -# Copyright 2016 Yaroslav Heriatovych. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -ARTIFACT_ID=reductor-rx -POM_NAME=ReductorRx \ No newline at end of file +ARTIFACT_ID=reductor-rxjava +POM_NAME=ReductorRxJava \ No newline at end of file diff --git a/rx-store/src/main/java/com/yheriatovych/reductor/rx/RxStore.java b/rx-store/src/main/java/com/yheriatovych/reductor/rx/RxStore.java index 09bb04f..07a9587 100644 --- a/rx-store/src/main/java/com/yheriatovych/reductor/rx/RxStore.java +++ b/rx-store/src/main/java/com/yheriatovych/reductor/rx/RxStore.java @@ -2,7 +2,7 @@ import com.yheriatovych.reductor.Cancelable; import com.yheriatovych.reductor.Store; -import rx.AsyncEmitter; +import rx.Emitter; import rx.Observable; public final class RxStore { @@ -13,10 +13,10 @@ public final class RxStore { * Note: This method will emit current sate immediately after subscribe */ public static Observable asObservable(final Store store) { - return Observable.fromAsync(stateAsyncEmitter -> { - stateAsyncEmitter.onNext(store.getState()); - final Cancelable cancelable = store.subscribe(stateAsyncEmitter::onNext); - stateAsyncEmitter.setCancellation(cancelable::cancel); - }, AsyncEmitter.BackpressureMode.LATEST); + return Observable.fromEmitter(emitter -> { + emitter.onNext(store.getState()); + final Cancelable cancelable = store.subscribe(emitter::onNext); + emitter.setCancellation(cancelable::cancel); + }, Emitter.BackpressureMode.LATEST); } }