From 650a067529cdf65cc9a9130c91511adfb4b64c98 Mon Sep 17 00:00:00 2001 From: Guillaume Jacquart Date: Thu, 24 Feb 2022 07:46:23 +0000 Subject: Access trackers list when QP disabled: #4591, #4596, #4601 --- .../java/foundation/e/flowmvi/feature/BaseFeature.kt | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'flow-mvi/src/main/java') 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 c60373f..1429d1a 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 @@ -31,7 +31,6 @@ import kotlinx.coroutines.flow.asFlow import kotlinx.coroutines.flow.asStateFlow import kotlinx.coroutines.flow.emitAll import kotlinx.coroutines.flow.launchIn -import kotlinx.coroutines.flow.onCompletion import kotlinx.coroutines.flow.onEach import kotlinx.coroutines.flow.onStart import kotlinx.coroutines.flow.receiveAsFlow @@ -72,17 +71,10 @@ open class BaseFeature, - logger: Logger + @Suppress("UNUSED_PARAMETER") logger: Logger ) { state - .onStart { - logger.invoke("State flow started") - } - .onCompletion { - logger.invoke("State flow completed") - } .onEach { - logger.invoke("New state: $it") view.render(it) } .launchIn(callerCoroutineScope) @@ -98,12 +90,8 @@ open class BaseFeature - logger.invoke("View actions flow completed: $cause") - } .collectIntoHandler(this, logger) } } @@ -116,15 +104,13 @@ open class BaseFeature.collectIntoHandler( callerCoroutineScope: CoroutineScope, - logger: Logger + @Suppress("UNUSED_PARAMETER") logger: Logger ) { onEach { action -> callerCoroutineScope.launch { - logger.invoke("Received action $action $this") actor.invoke(_state.value, action) .onEach { effect -> mutex.withLock { - logger.invoke("Applying effect $effect from action $action") val newState = reducer.invoke(_state.value, effect) _state.value = newState singleEventProducer?.also { -- cgit v1.2.1