diff options
author | Amit Kumar <amitkma@e.email> | 2021-05-03 23:38:48 +0530 |
---|---|---|
committer | Amit Kumar <amitkma@e.email> | 2021-05-03 23:38:48 +0530 |
commit | 28f21297e4d700384f0d445fd4a296ad2bcc496a (patch) | |
tree | d85af6dab61c230ab5f0b0f701737fa00580efa5 /flow-mvi/src/main | |
parent | 0d036a8742f54eb9ea87e64fdce9ab878f58859b (diff) |
Add FakeLocation and InternetActivityPrivacy feature
Diffstat (limited to 'flow-mvi/src/main')
-rw-r--r-- | flow-mvi/src/main/java/foundation/e/flowmvi/feature/BaseFeature.kt | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/flow-mvi/src/main/java/foundation/e/flowmvi/feature/BaseFeature.kt b/flow-mvi/src/main/java/foundation/e/flowmvi/feature/BaseFeature.kt index f7236ca..8dec0c4 100644 --- a/flow-mvi/src/main/java/foundation/e/flowmvi/feature/BaseFeature.kt +++ b/flow-mvi/src/main/java/foundation/e/flowmvi/feature/BaseFeature.kt @@ -101,8 +101,8 @@ open class BaseFeature<State : Any, in Action : Any, in Effect : Any, SingleEven logger.invoke("View actions flow started") emitAll(initialActions.asFlow()) } - .onCompletion { - logger.invoke("View actions flow completed") + .onCompletion { cause -> + logger.invoke("View actions flow completed: $cause") } .collectIntoHandler(this, logger) } @@ -142,19 +142,3 @@ open class BaseFeature<State : Any, in Action : Any, in Effect : Any, SingleEven .launchIn(callerCoroutineScope) } } - -fun <State : Any, Action : Any, Effect : Any, SingleEvent : Any> feature( - initialState: State, - actor: Actor<State, Action, Effect>, - reducer: Reducer<State, Effect>, - coroutineScope: CoroutineScope, - defaultLogger: Logger = {}, - singleEventProducer: SingleEventProducer<State, Action, Effect, SingleEvent>? = null -) = BaseFeature( - initialState, - actor, - reducer, - coroutineScope, - defaultLogger, - singleEventProducer -) |