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

Skip to content
Commit 07454189 authored by Michal Brzezinski's avatar Michal Brzezinski Committed by Michał Brzeziński
Browse files

Adding first error state for touchpad tutorial

Adding first case for error state - when gesture is done with correct number of fingers but doesn't meet distance or velocity criteria.

1. UI part:
    - Adding new strings for error states and new config entries to keep them
    - Introducing new GestureUiState.Error and two new states for TutorialActionState: Error and InProgressAfterError
2. Business logic:
    - Adding new GestureState.Error - for now only used in one case

The tricky part is keeping error state when in progress after error happens so that title text doesn't immediately change to back to it's previous text when progress starts again. That's why InProgressAfterError is introduced.
It's becoming clear that there's more and more logic in Compose code and it's harder to test (that's why StateTransitionsTest mimics logic in compose) so I'll try to extract all of that to new ViewModel soon - so that each screen has its own ViewModel.

Bug: 381831607
Flag: com.android.systemui.shared.new_touchpad_gestures_tutorial
Test: StateTransitionsTest
Test: ThreeFingerGestureRecognizerTest
Change-Id: Ia751b279d0e609b6289dc2e208b709725257f166
parent 1fcff7e0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment