summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author András Kurucz <kurucz@google.com> 2025-03-17 09:11:52 +0000
committer András Kurucz <kurucz@google.com> 2025-03-17 03:59:38 -0700
commit8a7e4c12d075128ce2213a6f59930de0aaebb194 (patch)
treed51bf6caa91b631db618c80b6da1e2891510d1b2
parent39f6dcefc19c9fb0557f53570db3228c9c1ba90a (diff)
[Flexiglass] Use disableSwipesWhenScrolling for nested scrolling as well
Modifier.disableSwipesWhenScrolling disables the STL user actions if anything below it in the Compose tree has consumed any non-zero scroll amount during the current gesture. This is important, because a swipe up can close the shade, and we don't want that to happen while the stack is being scrolled. This CL changes the orders of modifiers on the scrollable stack, so we do this behavior for both nested and regular scrolling. Bug: 394813692 Test: verify that a nested scroll doesn't close the shade - Open Single shade - Have enough notifications to scroll, BUT - Have a small enough scroll range that only needs nested scrolling - Scroll to the bottom with one long continuous motion - CHECK: the shade stays open Flag: com.android.systemui.scene_container Change-Id: I7624d9326192185a0d7e6a51616fc846892bbf26
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt b/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt
index 09b8d178cc8e..3e907e87c13b 100644
--- a/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt
+++ b/packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt
@@ -574,11 +574,11 @@ fun ContentScope.NotificationScrollingStack(
) {
Column(
modifier =
- Modifier.thenIf(supportNestedScrolling) {
+ Modifier.disableSwipesWhenScrolling(NestedScrollableBound.BottomRight)
+ .thenIf(supportNestedScrolling) {
Modifier.nestedScroll(scrimNestedScrollConnection)
}
.stackVerticalOverscroll(coroutineScope) { scrollState.canScrollForward }
- .disableSwipesWhenScrolling(NestedScrollableBound.BottomRight)
.verticalScroll(scrollState)
.padding(top = stackTopPadding, bottom = stackBottomPadding)
.fillMaxWidth()