Utilize an effect to initialize the current anchor.

This commit is contained in:
Alex Hart
2025-10-27 13:57:56 -03:00
committed by jeffrey-signal
parent 63ab448a27
commit 8fbfc40ed5

View File

@@ -429,6 +429,12 @@ class MainActivity : PassphraseRequiredActivity(), VoiceNoteMediaControllerOwner
}
}
LaunchedEffect(paneExpansionState.currentAnchor, detailAndListAnchor) {
if (paneExpansionState.currentAnchor == null) {
paneExpansionState.animateTo(detailAndListAnchor)
}
}
LaunchedEffect(paneExpansionState.currentAnchor, detailOnlyAnchor, listOnlyAnchor, detailAndListAnchor) {
val isFullScreenPane = when (paneExpansionState.currentAnchor) {
listOnlyAnchor, detailOnlyAnchor -> {