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

Commit 150e4597 authored by Michal Brzezinski's avatar Michal Brzezinski
Browse files

1/n refactoring: splitting ViewModels into separate smaller classes

Splitting ViewModels into smaller more cohesive classes with extracted common logic:
- GestureRecognizerAdapter transforms callback based GestureRecognizer into Flow and substitutes GestureFlowAdapter
- GestureRecognizerProvider which hides complexity of observing changes in resources and refreshing GestureRecognizer
- TouchpadGestureResources extracts common code for accessing latest values for distance and velocity

In that new class structure ViewModels responsibility is only to transform business state into Ui state that is to collect latest GestureState from GestureRecognizerAdapter and transform it into GestureUiState.

Bug: 384509663
Test: all unit tests
Flag: com.android.systemui.shared.new_touchpad_gestures_tutorial
Change-Id: I2da7cbeb530a1d4de91746d22b8126fd74e7154b
parent d00d46e2
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