From fe89cf675e44e0656982c8d4621e3627b8c41ef5 Mon Sep 17 00:00:00 2001 From: Roberto Orgiu Date: Fri, 6 Sep 2024 11:41:33 +0200 Subject: [PATCH] Update CanonicalLayouts/list-detail-compose/app/src/main/java/com/example/listdetailcompose/ui/ListDetailSample.kt Co-authored-by: Alex Vanyo --- .../java/com/example/listdetailcompose/ui/ListDetailSample.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CanonicalLayouts/list-detail-compose/app/src/main/java/com/example/listdetailcompose/ui/ListDetailSample.kt b/CanonicalLayouts/list-detail-compose/app/src/main/java/com/example/listdetailcompose/ui/ListDetailSample.kt index 1f1926b41..3e55a7252 100644 --- a/CanonicalLayouts/list-detail-compose/app/src/main/java/com/example/listdetailcompose/ui/ListDetailSample.kt +++ b/CanonicalLayouts/list-detail-compose/app/src/main/java/com/example/listdetailcompose/ui/ListDetailSample.kt @@ -97,7 +97,7 @@ fun ListDetailSample() { var selectedWordIndex: Int? by rememberSaveable { mutableStateOf(null) } val navigator = rememberListDetailPaneScaffoldNavigator() val isListAndDetailVisible = - currentWindowAdaptiveInfo().windowSizeClass.windowWidthSizeClass == WindowWidthSizeClass.EXPANDED + navigator.scaffoldValue[ListDetailPaneScaffoldRole.Detail] == PaneAdaptedValue.Expanded && navigator.scaffoldValue[ListDetailPaneScaffoldRole.List] == PaneAdaptedValue.Expanded BackHandler(enabled = navigator.canNavigateBack()) { navigator.navigateBack()