From dc140442f1324d17fc0071f314959b5fc94bfb07 Mon Sep 17 00:00:00 2001 From: jinukeu Date: Tue, 23 Jan 2024 19:47:58 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20LedgerFilterScreen=20=EC=98=88=EC=99=B8?= =?UTF-8?q?=20=ED=95=B8=EB=93=A4=EB=A7=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../susu/feature/received/ledgerfilter/LedgerFilterScreen.kt | 3 ++- .../com/susu/feature/received/navigation/ReceivedNavigation.kt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/feature/received/src/main/java/com/susu/feature/received/ledgerfilter/LedgerFilterScreen.kt b/feature/received/src/main/java/com/susu/feature/received/ledgerfilter/LedgerFilterScreen.kt index 52c0c2c8..3835428c 100644 --- a/feature/received/src/main/java/com/susu/feature/received/ledgerfilter/LedgerFilterScreen.kt +++ b/feature/received/src/main/java/com/susu/feature/received/ledgerfilter/LedgerFilterScreen.kt @@ -47,11 +47,12 @@ fun LedgerFilterRoute( viewModel: LedgerFilterViewModel = hiltViewModel(), popBackStack: () -> Unit, popBackStackWithFilter: (String) -> Unit, + handleException: (Throwable, () -> Unit) -> Unit, ) { val uiState = viewModel.uiState.collectAsStateWithLifecycle().value viewModel.sideEffect.collectWithLifecycle { sideEffect -> when (sideEffect) { - is LedgerFilterSideEffect.HandleException -> TODO() + is LedgerFilterSideEffect.HandleException -> handleException(sideEffect.throwable, sideEffect.retry) LedgerFilterSideEffect.PopBackStack -> popBackStack() is LedgerFilterSideEffect.PopBackStackWithFilter -> popBackStackWithFilter(sideEffect.filter) } diff --git a/feature/received/src/main/java/com/susu/feature/received/navigation/ReceivedNavigation.kt b/feature/received/src/main/java/com/susu/feature/received/navigation/ReceivedNavigation.kt index 0dd0fcb5..5419250b 100644 --- a/feature/received/src/main/java/com/susu/feature/received/navigation/ReceivedNavigation.kt +++ b/feature/received/src/main/java/com/susu/feature/received/navigation/ReceivedNavigation.kt @@ -136,6 +136,7 @@ fun NavGraphBuilder.receivedNavGraph( LedgerFilterRoute( popBackStack = popBackStack, popBackStackWithFilter = popBackStackWithFilter, + handleException = handleException, ) }