library: drop exitDownward, it never ran inside a lazy list
- Commit
7e7ed9cc79cce60c7b561b657744d65d2649c8c7- Author
- vayun-mathur <[email protected]>
- When
- 2026-08-31 16:18 UTC (3 months ago)
- Parents
610b17f
Diff
contacts/src/main/java/com/vayunmathur/contacts/ui/ContactDetailsPage.kt
diff --git a/contacts/src/main/java/com/vayunmathur/contacts/ui/ContactDetailsPage.kt b/contacts/src/main/java/com/vayunmathur/contacts/ui/ContactDetailsPage.ktindex 18ec510ff7..99efeed591 100644--- a/contacts/src/main/java/com/vayunmathur/contacts/ui/ContactDetailsPage.kt+++ b/contacts/src/main/java/com/vayunmathur/contacts/ui/ContactDetailsPage.kt@@ -43,7 +43,6 @@ import com.vayunmathur.library.ui.DetailLazyColumn import com.vayunmathur.library.ui.IconButton import com.vayunmathur.library.ui.MaterialTheme import com.vayunmathur.library.ui.Surface-import com.vayunmathur.library.util.exitDownward import com.vayunmathur.library.util.sharedContainer import com.vayunmathur.library.util.sharedText import com.vayunmathur.library.util.sharedContent@@ -473,10 +472,6 @@ fun ContactDetailsScreen( data = ringtoneTitle(context, contact.customRingtone), label = stringResource(R.string.ringtone), onClick = { actions.pickRingtone(contact) },- // The groups block above this one grows downwards as it morphs into the editor,- // travelling straight over this row. Fading in place would leave it half-legible- // underneath; moving with the traveller gets it out of the way.- modifier = Modifier.exitDownward(), ) } }
library/src/main/java/com/vayunmathur/library/util/Navigation.kt
diff --git a/library/src/main/java/com/vayunmathur/library/util/Navigation.kt b/library/src/main/java/com/vayunmathur/library/util/Navigation.ktindex 11701a87cd..2f07e2d2a2 100644--- a/library/src/main/java/com/vayunmathur/library/util/Navigation.kt+++ b/library/src/main/java/com/vayunmathur/library/util/Navigation.kt@@ -40,7 +40,7 @@ import androidx.compose.material3.SnackbarHostState import androidx.compose.material3.SnackbarResult import androidx.compose.material3.Text import androidx.compose.material3.adaptive.ExperimentalMaterial3AdaptiveApi-import androidx.compose.material3.adaptive.currentWindowAdaptiveInfo+import androidx.compose.material3.adaptive.currentWindowAdaptiveInfoV2 import androidx.compose.material3.adaptive.navigation3.ListDetailSceneStrategy import androidx.compose.material3.adaptive.navigation3.rememberListDetailSceneStrategy import androidx.compose.runtime.Composable@@ -453,7 +453,7 @@ fun <T: NavKey> MainNavigation( val transitions = rememberNavTransitions() // Matches the width at which the list-detail strategy starts showing two panes at once.- val multiPane = currentWindowAdaptiveInfo().windowSizeClass+ val multiPane = currentWindowAdaptiveInfoV2().windowSizeClass .isWidthAtLeastBreakpoint(WindowSizeClass.WIDTH_DP_MEDIUM_LOWER_BOUND) val resolvedContainerColor = containerColor.takeOrElse { MaterialTheme.colorScheme.background }@@ -558,33 +558,6 @@ fun <T: NavKey> rememberNavBackStack(vararg elements: T): NavBackStack<T> { } } -/**- * Sends just this element down and out of the window as the screen leaves, instead of fading in place.- *- * Narrow tool, and deliberately not the default for a morph. Use it only where something above this- * element travels *downwards over it* during the transition: a fading element still occupies its space- * for the whole fade, so the traveller crosses over something half-legible. Moving it in the same- * direction as the traveller clears the path.- *- * Everywhere else this is wrong. Vertical movement reads as the screen falling apart, and applying it- * broadly costs the calm of a plain crossfade for no gain - which is why it is opt-in per element.- *- * No-ops outside a [MainNavigation].- */-@Composable-fun Modifier.exitDownward(): Modifier {- val scope = LocalEntryAnimatedScope.current ?: return this- val motion = MaterialTheme.motionScheme- val offset = motion.defaultSpatialSpec<IntOffset>()- val alpha = motion.defaultEffectsSpec<Float>()- return with(scope) {- [email protected](- enter = fadeIn(alpha),- exit = fadeOut(alpha) + slideOutVertically(offset) { it },- )- }-}- /** * [sharedContainer] for text. *