From 513d1e96da1e328634f533483c5e1af5013f7a0d Mon Sep 17 00:00:00 2001 From: sockeqwe Date: Sun, 8 Apr 2018 22:53:52 +0200 Subject: [PATCH] use unicast subject --- .../java/com/hannesdorfmann/mosby3/mvi/MviBasePresenter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mvi-common/src/main/java/com/hannesdorfmann/mosby3/mvi/MviBasePresenter.java b/mvi-common/src/main/java/com/hannesdorfmann/mosby3/mvi/MviBasePresenter.java index b8822744..66bc5bc4 100644 --- a/mvi-common/src/main/java/com/hannesdorfmann/mosby3/mvi/MviBasePresenter.java +++ b/mvi-common/src/main/java/com/hannesdorfmann/mosby3/mvi/MviBasePresenter.java @@ -33,6 +33,7 @@ import io.reactivex.subjects.BehaviorSubject; import io.reactivex.subjects.ReplaySubject; import io.reactivex.subjects.Subject; +import io.reactivex.subjects.UnicastSubject; /** * This type of presenter is responsible for interaction with the viewState in a Model-View-Intent way. @@ -449,7 +450,7 @@ protected void unbindIntents() { */ @MainThread protected Observable intent(ViewIntentBinder binder) { - Subject intentRelay = ReplaySubject.create(); + Subject intentRelay = UnicastSubject.create(); intentRelaysBinders.add(new IntentRelayBinderPair(intentRelay, binder)); return intentRelay; }