Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 76dc7ff3 authored by András Kurucz's avatar András Kurucz Committed by Android (Google) Code Review
Browse files

Merge "[Flexiglass] Set headsUpTop directly on the NSSL" into main

parents cffa14fa 2b55149a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -126,7 +126,8 @@ fun SceneScope.HeadsUpNotificationSpace(
                            " size=${coordinates.size}" +
                            " bounds=$boundsInWindow"
                    }
                    viewModel.onHeadsUpTopChanged(boundsInWindow.top)
                    // Note: boundsInWindow doesn't scroll off the screen
                    stackScrollView.setHeadsUpTop(boundsInWindow.top)
                }
    ) {
        content {}
+0 −3
Original line number Diff line number Diff line
@@ -38,9 +38,6 @@ class NotificationPlaceholderRepository @Inject constructor() {
     */
    val shadeScrimBounds = MutableStateFlow<ShadeScrimBounds?>(null)

    /** the y position of the top of the HUN area */
    val headsUpTop = MutableStateFlow(0f)

    /** height made available to the notifications in the size-constrained mode of lock screen. */
    val constrainedAvailableSpace = MutableStateFlow(0)

+0 −7
Original line number Diff line number Diff line
@@ -79,9 +79,6 @@ constructor(
     */
    val scrolledToTop: StateFlow<Boolean> = placeholderRepository.scrolledToTop.asStateFlow()

    /** The y-coordinate in px of bottom of the contents of the HUN. */
    val headsUpTop: StateFlow<Float> = placeholderRepository.headsUpTop.asStateFlow()

    /**
     * The amount in px that the notification stack should scroll due to internal expansion. This
     * should only happen when a notification expansion hits the bottom of the screen, so it is
@@ -125,8 +122,4 @@ constructor(
    fun setConstrainedAvailableSpace(height: Int) {
        placeholderRepository.constrainedAvailableSpace.value = height
    }

    fun setHeadsUpTop(headsUpTop: Float) {
        placeholderRepository.headsUpTop.value = headsUpTop
    }
}
+0 −2
Original line number Diff line number Diff line
@@ -139,8 +139,6 @@ constructor(
     */
    val scrolledToTop: Flow<Boolean> =
        stackAppearanceInteractor.scrolledToTop.dumpValue("scrolledToTop")
    /** The y-coordinate in px of bottom of the contents of the HUN. */
    val headsUpTop: Flow<Float> = stackAppearanceInteractor.headsUpTop.dumpValue("headsUpTop")

    /** Receives the amount (px) that the stack should scroll due to internal expansion. */
    val syntheticScrollConsumer: (Float) -> Unit = stackAppearanceInteractor::setSyntheticScroll
+0 −4
Original line number Diff line number Diff line
@@ -60,10 +60,6 @@ constructor(
        interactor.setConstrainedAvailableSpace(height)
    }

    fun onHeadsUpTopChanged(headsUpTop: Float) {
        interactor.setHeadsUpTop(headsUpTop)
    }

    /** Sets the content alpha for the current state of the brightness mirror */
    fun setAlphaForBrightnessMirror(alpha: Float) {
        interactor.setAlphaForBrightnessMirror(alpha)