diff --git a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/TwoPaneScaffold.kt b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/TwoPaneScaffold.kt index db5596703..490d1ccf1 100644 --- a/app/src/main/java/com/infomaniak/swisstransfer/ui/components/TwoPaneScaffold.kt +++ b/app/src/main/java/com/infomaniak/swisstransfer/ui/components/TwoPaneScaffold.kt @@ -77,6 +77,10 @@ fun TwoPaneScaffold( ) } +/** + * Keep the DetailPane's content in memory so that it's always available while navigating back. + * When leaving the DetailPane, its content becomes `null`, which creates a visual glitch in the back animation. + */ @OptIn(ExperimentalMaterial3AdaptiveApi::class) @Composable fun ThreePaneScaffoldNavigator.safeCurrentContent(): T? {