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

Skip to content
Commit 396d9caf authored by Jordan Demeulenaere's avatar Jordan Demeulenaere
Browse files

Make UserActionResult a class instead of interface (1/2)

In ag/25970777, we introduced a new UserActionResult interface to allow
the user to specify the distance of a user action, as well as changing
the transition key of a user action. This CL made the UserActionResult
an interface that was implemented by SceneKey, so that the old and most
common syntax userActions=mapOf(Swipe.Up to Scenes.Foo) still compiles.

After some discussions with other peers, it came out the the
UserActionResult being an interface implemented by SceneKey was
confusing. This CL makes the UserActionResult a class and instead
overloads the infix `to` function in UserAction so that
`UserAction to SceneKey` returns a Pair<UserAction, UserActionResult>
instead of a Pair<UserAction, SceneKey>, still allowing the shorter and
most common syntax to define user actions.

Bug: 321932826
Test: PlatformComposeSceneTransitionLayoutTests
Flag: N/A
Change-Id: I99566aee81bdd14022e0eda2af9144525d77da49
parent fa838838
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment