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

Commit 9eada0db authored by Jordan Demeulenaere's avatar Jordan Demeulenaere Committed by Android (Google) Code Review
Browse files

Merge "Remove BaseSceneTransitionLayoutState" into main

parents 6d242ee6 541ba40f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ import kotlinx.coroutines.launch
 * the currently running transition, if there is one.
 */
internal fun CoroutineScope.animateToScene(
    layoutState: BaseSceneTransitionLayoutState,
    layoutState: MutableSceneTransitionLayoutStateImpl,
    target: SceneKey,
    transitionKey: TransitionKey?,
): TransitionState.Transition? {
@@ -154,7 +154,7 @@ internal fun CoroutineScope.animateToScene(
}

private fun CoroutineScope.animate(
    layoutState: BaseSceneTransitionLayoutState,
    layoutState: MutableSceneTransitionLayoutStateImpl,
    targetScene: SceneKey,
    transitionKey: TransitionKey?,
    isInitiatedByUserInput: Boolean,
+2 −5
Original line number Diff line number Diff line
@@ -370,9 +370,6 @@ private class DragControllerImpl(
            // immediately go back B => A.
            if (targetScene != swipeTransition._currentScene) {
                swipeTransition._currentScene = targetScene
                with(draggableHandler.layoutImpl.state) {
                    draggableHandler.coroutineScope.onChangeScene(targetScene.key)
                }
            }

            swipeTransition.animateOffset(
@@ -512,7 +509,7 @@ private class DragControllerImpl(
}

private fun SwipeTransition(
    layoutState: BaseSceneTransitionLayoutState,
    layoutState: MutableSceneTransitionLayoutStateImpl,
    coroutineScope: CoroutineScope,
    fromScene: Scene,
    result: UserActionResult,
@@ -567,7 +564,7 @@ private fun SwipeTransition(old: SwipeTransition): SwipeTransition {

private class SwipeTransition(
    val layoutImpl: SceneTransitionLayoutImpl,
    val layoutState: BaseSceneTransitionLayoutState,
    val layoutState: MutableSceneTransitionLayoutStateImpl,
    val coroutineScope: CoroutineScope,
    override val key: TransitionKey?,
    val _fromScene: Scene,
+2 −2
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ import kotlinx.coroutines.launch

@Composable
internal fun PredictiveBackHandler(
    state: BaseSceneTransitionLayoutState,
    state: MutableSceneTransitionLayoutStateImpl,
    coroutineScope: CoroutineScope,
    targetSceneForBack: SceneKey? = null,
) {
@@ -65,7 +65,7 @@ internal fun PredictiveBackHandler(
}

private class PredictiveBackTransition(
    val state: BaseSceneTransitionLayoutState,
    val state: MutableSceneTransitionLayoutStateImpl,
    val coroutineScope: CoroutineScope,
    fromScene: SceneKey,
    toScene: SceneKey,
+1 −1
Original line number Diff line number Diff line
@@ -514,7 +514,7 @@ internal fun SceneTransitionLayoutForTesting(
    val coroutineScope = rememberCoroutineScope()
    val layoutImpl = remember {
        SceneTransitionLayoutImpl(
                state = state as BaseSceneTransitionLayoutState,
                state = state as MutableSceneTransitionLayoutStateImpl,
                density = density,
                layoutDirection = layoutDirection,
                swipeSourceDetector = swipeSourceDetector,
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ internal typealias MovableElementContent = @Composable (@Composable () -> Unit)

@Stable
internal class SceneTransitionLayoutImpl(
    internal val state: BaseSceneTransitionLayoutState,
    internal val state: MutableSceneTransitionLayoutStateImpl,
    internal var density: Density,
    internal var layoutDirection: LayoutDirection,
    internal var swipeSourceDetector: SwipeSourceDetector,
Loading