summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt5
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,
)