diff options
| author | 2024-06-14 10:33:55 -0400 | |
|---|---|---|
| committer | 2024-06-14 10:38:08 -0400 | |
| commit | 5df98cc7d08013a94a1cc1857e044fadaa2e68a4 (patch) | |
| tree | 1c38192e11edc971864db45a0844e739eedd8d21 | |
| parent | 671b1184e4f22f4605f703d8640d8c703cc084a4 (diff) | |
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
| -rw-r--r-- | packages/SystemUI/compose/features/src/com/android/systemui/communal/ui/compose/CommunalContainer.kt | 10 |
1 files 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(), + ) } } |