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

Commit e9b966ce authored by Christian Göllner's avatar Christian Göllner
Browse files

Split shade: fix lockscreen drag down happening on the wrong side

The issue was caused by the horizontal offset of the notifications
container on split shade being "counted" twice.

On handheld this was a non-issue, since the offset is non existent.

Fixes: 264575009
Test: Manually on device. See video.
Change-Id: I04eed5f608bf6f8c65f8a22385e655315ff85f23
parent 32266155
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -262,7 +262,6 @@ class LockscreenShadeTransitionController @Inject constructor(

    fun setStackScroller(nsslController: NotificationStackScrollLayoutController) {
        this.nsslController = nsslController
        touchHelper.host = nsslController.view
        touchHelper.expandCallback = nsslController.expandHelperCallback
    }

@@ -736,14 +735,12 @@ class DragDownHelper(

    private var dragDownAmountOnStart = 0.0f
    lateinit var expandCallback: ExpandHelper.Callback
    lateinit var host: View

    private var minDragDistance = 0
    private var initialTouchX = 0f
    private var initialTouchY = 0f
    private var touchSlop = 0f
    private var slopMultiplier = 0f
    private val temp2 = IntArray(2)
    private var draggedFarEnough = false
    private var startingChild: ExpandableView? = null
    private var lastHeight = 0f
@@ -923,7 +920,6 @@ class DragDownHelper(
    }

    private fun findView(x: Float, y: Float): ExpandableView? {
        host.getLocationOnScreen(temp2)
        return expandCallback.getChildAtRawPosition(x + temp2[0], y + temp2[1])
        return expandCallback.getChildAtRawPosition(x, y)
    }
}