Skip to content

Commit

Permalink
fix mvi-sample crash (#324)
Browse files Browse the repository at this point in the history
MviBasePresenter.intent used UnicastSubject.
selectedItemsIntent used from multi subscribers So it tranform to connectable observable.
  • Loading branch information
satoshun authored and sockeqwe committed Dec 3, 2018
1 parent 87df432 commit 0b00922
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ public ShoppingCartOverviewPresenter(ShoppingCart shoppingCart,
intent(ShoppingCartOverviewView::selectItemsIntent)
.mergeWith(clearSelectionIntent.map(ignore -> Collections.emptyList()))
.doOnNext(items -> Timber.d("intent: selected items %d", items.size()))
.startWith(new ArrayList<Product>(0));
.startWith(new ArrayList<Product>(0))
.publish()
.refCount();

//
// Delete multiple selected Items
Expand Down

0 comments on commit 0b00922

Please sign in to comment.