findfamily: collapse sheet when entering history mode (#818)
- Commit
0975992b01dc335df3dd1381e4bad0684f6111ca- Author
- vayun-mathur <[email protected]>
- When
- 2026-10-14 23:25 UTC (1 month ago)
- Parents
59b5593
Diff
findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageContent.kt
diff --git a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageContent.kt b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageContent.ktindex 5a80befca4..190a4933bf 100644--- a/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageContent.kt+++ b/findfamily/src/main/java/com/vayunmathur/findfamily/ui/MainPageContent.kt@@ -96,16 +96,18 @@ fun MainPageContent( } } - // Leaving history sets the peek back to non-zero, but the collapsed sheet needs- // a nudge to animate back to its peek. Retry until the anchor is ready.+ // Changing the peek does not relocate a sheet that is already settled, in either+ // direction. Entering history drops the peek to its 1dp sliver, but a tall person+ // sheet stays put, shows the empty history content, and covers the scrubber card+ // floating underneath it (GitHub #818). Leaving history restores the peek without+ // pulling the sliver back up. Nudge toward the peek on both transitions, retrying+ // until the anchor is ready. LaunchedEffect(state.historyMode) {- if (!state.historyMode) {- repeat(10) {- if (runCatching { scaffoldState.bottomSheetState.partialExpand() }.isSuccess) {- return@LaunchedEffect- }- kotlinx.coroutines.delay(50)+ repeat(10) {+ if (runCatching { scaffoldState.bottomSheetState.partialExpand() }.isSuccess) {+ return@LaunchedEffect }+ kotlinx.coroutines.delay(50) } } }