Skip to content

Commit

Permalink
add a check to whileSubscribed for number of subs
Browse files Browse the repository at this point in the history
  • Loading branch information
Nek-12 committed Dec 1, 2023
1 parent 9a334bd commit c5a562b
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ public inline fun <S : MVIState, I : MVIIntent, A : MVIAction> whileSubscribedPl
minSubscriptions: Int = 1,
@BuilderInference crossinline block: suspend PipelineContext<S, I, A>.() -> Unit,
): StorePlugin<S, I, A> = plugin {
require(minSubscriptions > 0) { "Minimum number of subscribers must be greater than 0" }
this.name = name
val job = atomic<Job?>(null)
onSubscribe { previous ->
Expand Down

0 comments on commit c5a562b

Please sign in to comment.