From 17eda8b0b12a93549c5bb7fdeb732326409e67c6 Mon Sep 17 00:00:00 2001 From: Sasikanth Miriyampalli Date: Sun, 4 Aug 2024 05:27:09 +0530 Subject: [PATCH] Ignore sheet hidden state events in home screen --- .../kotlin/dev/sasikanth/rss/reader/home/ui/HomeScreen.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/HomeScreen.kt b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/HomeScreen.kt index b16ef9252..338a77a61 100644 --- a/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/HomeScreen.kt +++ b/shared/src/commonMain/kotlin/dev/sasikanth/rss/reader/home/ui/HomeScreen.kt @@ -96,7 +96,12 @@ internal fun HomeScreen(homePresenter: HomePresenter, modifier: Modifier = Modif rememberStandardBottomSheetState( initialValue = state.feedsSheetState, confirmValueChange = { - homePresenter.dispatch(HomeEvent.FeedsSheetStateChanged(it)) + if (it != SheetValue.Hidden) { + homePresenter.dispatch(HomeEvent.FeedsSheetStateChanged(it)) + } else { + homePresenter.dispatch(HomeEvent.FeedsSheetStateChanged(SheetValue.PartiallyExpanded)) + } + true } )