Loading packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt +5 −7 Original line number Diff line number Diff line Loading @@ -175,7 +175,7 @@ fun ContentScope.SnoozeableHeadsUpNotificationSpace( viewModel: NotificationsPlaceholderViewModel, ) { val isHeadsUp by viewModel.isHeadsUpOrAnimatingAway.collectAsStateWithLifecycle(false) val isSnoozable by viewModel.isHeadsUpOrAnimatingAway.collectAsStateWithLifecycle(false) var scrollOffset by remember { mutableFloatStateOf(0f) } val headsUpInset = with(LocalDensity.current) { headsUpTopInset().toPx() } Loading @@ -192,7 +192,7 @@ fun ContentScope.SnoozeableHeadsUpNotificationSpace( ) } val nestedScrollConnection = val snoozeScrollConnection = object : NestedScrollConnection { override suspend fun onPreFling(available: Velocity): Velocity { if ( Loading @@ -206,7 +206,7 @@ fun ContentScope.SnoozeableHeadsUpNotificationSpace( } } LaunchedEffect(isHeadsUp) { scrollOffset = 0f } LaunchedEffect(isSnoozable) { scrollOffset = 0f } LaunchedEffect(scrollableState.isScrollInProgress) { if (!scrollableState.isScrollInProgress && scrollOffset <= minScrollOffset) { Loading @@ -230,10 +230,8 @@ fun ContentScope.SnoozeableHeadsUpNotificationSpace( ), ) } .thenIf(isHeadsUp) { Modifier.nestedScroll(nestedScrollConnection) .scrollable(orientation = Orientation.Vertical, state = scrollableState) }, .thenIf(isSnoozable) { Modifier.nestedScroll(snoozeScrollConnection) } .scrollable(orientation = Orientation.Vertical, state = scrollableState), ) } Loading Loading
packages/SystemUI/compose/features/src/com/android/systemui/notifications/ui/composable/Notifications.kt +5 −7 Original line number Diff line number Diff line Loading @@ -175,7 +175,7 @@ fun ContentScope.SnoozeableHeadsUpNotificationSpace( viewModel: NotificationsPlaceholderViewModel, ) { val isHeadsUp by viewModel.isHeadsUpOrAnimatingAway.collectAsStateWithLifecycle(false) val isSnoozable by viewModel.isHeadsUpOrAnimatingAway.collectAsStateWithLifecycle(false) var scrollOffset by remember { mutableFloatStateOf(0f) } val headsUpInset = with(LocalDensity.current) { headsUpTopInset().toPx() } Loading @@ -192,7 +192,7 @@ fun ContentScope.SnoozeableHeadsUpNotificationSpace( ) } val nestedScrollConnection = val snoozeScrollConnection = object : NestedScrollConnection { override suspend fun onPreFling(available: Velocity): Velocity { if ( Loading @@ -206,7 +206,7 @@ fun ContentScope.SnoozeableHeadsUpNotificationSpace( } } LaunchedEffect(isHeadsUp) { scrollOffset = 0f } LaunchedEffect(isSnoozable) { scrollOffset = 0f } LaunchedEffect(scrollableState.isScrollInProgress) { if (!scrollableState.isScrollInProgress && scrollOffset <= minScrollOffset) { Loading @@ -230,10 +230,8 @@ fun ContentScope.SnoozeableHeadsUpNotificationSpace( ), ) } .thenIf(isHeadsUp) { Modifier.nestedScroll(nestedScrollConnection) .scrollable(orientation = Orientation.Vertical, state = scrollableState) }, .thenIf(isSnoozable) { Modifier.nestedScroll(snoozeScrollConnection) } .scrollable(orientation = Orientation.Vertical, state = scrollableState), ) } Loading