Removing LoginScreen to the navigation graph

This commit is contained in:
2021-09-07 12:51:41 +02:00
parent 6f56d8bf07
commit 1a71262008
6 changed files with 2 additions and 36 deletions
@@ -5,7 +5,6 @@ import kotlinx.coroutines.CoroutineDispatcher
import kotlinx.coroutines.flow.Flow
import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.flowOn
import kotlinx.coroutines.flow.onStart
/**
* Executes business logic in its execute method and keep posting updates to the result as
@@ -14,7 +13,6 @@ import kotlinx.coroutines.flow.onStart
*/
abstract class FlowUseCase<in P, R>(private val coroutineDispatcher: CoroutineDispatcher) {
operator fun invoke(parameters: P): Flow<Result<R>> = execute(parameters)
.onStart { emit(Result.Loading) }
.catch { e -> emit(Result.Error(Exception(e))) }
.flowOn(coroutineDispatcher)