From 5df98cc7d08013a94a1cc1857e044fadaa2e68a4 Mon Sep 17 00:00:00 2001 From: Lucas Silva Date: Fri, 14 Jun 2024 10:33:55 -0400 Subject: Allow hub to be closed using full canvas swipe Currently, the hub can only be closed by swiping on the left edge. This change allows the hub to be closed by swiping anywhere on the screen. Fixes: 346330753 Test: verified on hub with < 6 widgets where there is no scrolling Test: verified on hub with > 6 widgets where the grid scrolls Flag: com.android.systemui.communal_hub Change-Id: Id0559242301527bd7531e4af3b9a953754c1d04d --- .../android/systemui/communal/ui/compose/CommunalContainer.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt index c4659cfc146b..87bac83f6c0d 100644 --- a/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt +++ b/packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt @@ -226,10 +226,14 @@ fun CommunalContainer( scene( CommunalScenes.Communal, - userActions = - mapOf(Swipe(SwipeDirection.Right, fromSource = Edge.Left) to CommunalScenes.Blank) + userActions = mapOf(Swipe(SwipeDirection.Right) to CommunalScenes.Blank) ) { - CommunalScene(backgroundType, colors, content) + CommunalScene( + backgroundType = backgroundType, + colors = colors, + content = content, + modifier = Modifier.horizontalNestedScrollToScene(), + ) } } -- cgit v1.2.3-59-g8ed1b