diff options
| author | 2024-12-23 21:49:52 +0000 | |
|---|---|---|
| committer | 2024-12-23 21:50:40 +0000 | |
| commit | 52ff967542d9db616f9bcd6dbb67236f554e13a6 (patch) | |
| tree | 48890677498f33e211edced9b92cc5598f646965 | |
| parent | 0246da2287da41156eece839e8840204ce327197 (diff) | |
[flexiglass] Fix ScrollState#isScrolledToTop on split, and dual shade
ScrollState#isScrolledToTop incorrectly always returned true in split
and dual shade. This was due to a bug where we only considered the
scrim offset value, which is always zero in these configurations.
It was making the NSSL intercept all the downward swipes, which
expanded the notifications instead of scrolling the shade.
Fixes: 380210888
Test: scroll down the shade in split or dual shade
- have enough notifications in the shade to scroll
- swipe down when scrolled to the top -> swipe extends notif
- scroll up a bit, then swipe down -> swipe scrolls the stack
Flag: com.android.systemui.scene_container
Change-Id: Id8e4ba1b6e86d37b9eecc28e0bb041b2e70e139e
| -rw-r--r-- | packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt | 5 |
1 files changed, 3 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 58bfd08dfdbc..226e3c3dfa09 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 @@ -363,8 +363,9 @@ fun ContentScope.NotificationScrollingStack( val shadeScrollState by remember { derivedStateOf { ShadeScrollState( - // we are not scrolled to the top unless the scrim is at its maximum offset. - isScrolledToTop = scrimOffset.value >= 0f, + // we are not scrolled to the top unless the scroll position is zero, + // and the scrim is at its maximum offset + isScrolledToTop = scrimOffset.value >= 0f && scrollState.value == 0, scrollPosition = scrollState.value, maxScrollPosition = scrollState.maxValue, ) |