mirror of
https://github.com/meowarex/rl-mobile.git
synced 2026-08-26 22:17:44 +10:00
Gestures Rewrite
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
--- a/com/tidal/android/feature/playerscreen/ui/composables/LyricsKt.smali
|
||||
+++ b/com/tidal/android/feature/playerscreen/ui/composables/LyricsKt.smali
|
||||
@@ -6107,6 +6107,10 @@
|
||||
|
||||
move-object v15, v10
|
||||
|
||||
+ invoke-static {v15}, Lradiant/gestures/LyricsDrag;->wrap(Landroidx/compose/ui/Modifier;)Landroidx/compose/ui/Modifier; # lyrics own their scroll
|
||||
+
|
||||
+ move-result-object v15
|
||||
+
|
||||
.line 61
|
||||
invoke-static/range {v15 .. v27}, Landroidx/compose/foundation/lazy/LazyDslKt;->LazyColumn(Landroidx/compose/ui/Modifier;Landroidx/compose/foundation/lazy/LazyListState;Landroidx/compose/foundation/layout/PaddingValues;ZLandroidx/compose/foundation/layout/Arrangement$Vertical;Landroidx/compose/ui/Alignment$Horizontal;Landroidx/compose/foundation/gestures/FlingBehavior;ZLandroidx/compose/foundation/OverscrollEffect;Lam0/l;Landroidx/compose/runtime/Composer;II)V
|
||||
|
||||
@@ -0,0 +1,126 @@
|
||||
--- a/com/tidal/android/feature/appscaffold/ui/composable/MiniPlayerKt.smali
|
||||
+++ b/com/tidal/android/feature/appscaffold/ui/composable/MiniPlayerKt.smali
|
||||
@@ -1215,6 +1215,10 @@
|
||||
|
||||
move-result-object v6
|
||||
|
||||
+ invoke-static {v6, v1}, Lradiant/gestures/MiniPlayerTrackGestures;->trackModifier(Landroidx/compose/ui/Modifier;Lam0/l;)Landroidx/compose/ui/Modifier; # attach horizontal swipe listener
|
||||
+
|
||||
+ move-result-object v6
|
||||
+
|
||||
.line 38
|
||||
sget-object v21, Landroidx/compose/ui/Alignment;->Companion:Landroidx/compose/ui/Alignment$Companion;
|
||||
|
||||
@@ -1352,6 +1356,8 @@
|
||||
.line 56
|
||||
iget-object v11, v0, Lcom/tidal/android/feature/appscaffold/ui/t;->b:Lcom/tidal/android/feature/appscaffold/ui/q;
|
||||
|
||||
+ invoke-static {v11}, Lradiant/gestures/MiniPlayerTrackGestures;->onRenderedItem(Ljava/lang/Object;)V # reset stale drag offset if track metadata changes mid-gesture
|
||||
+
|
||||
.line 57
|
||||
invoke-virtual/range {v16 .. v16}, Lcom/squareup/ui/market/core/theme/MarketStylesheet;->getBorderRadii()Lcom/squareup/ui/market/core/theme/MarketStylesheet$b;
|
||||
|
||||
@@ -1390,6 +1396,10 @@
|
||||
|
||||
move-result-object v6
|
||||
|
||||
+ invoke-static {v6}, Lradiant/gestures/MiniPlayerTrackGestures;->feedbackModifier(Landroidx/compose/ui/Modifier;)Landroidx/compose/ui/Modifier; # move the whole cover container with horizontal swipe
|
||||
+
|
||||
+ move-result-object v6
|
||||
+
|
||||
.line 63
|
||||
invoke-virtual/range {v22 .. v22}, Lcom/squareup/ui/market/core/theme/MarketStylesheet$c;->p0()Lf20/a;
|
||||
|
||||
@@ -1501,6 +1511,10 @@
|
||||
|
||||
move-result-object v5
|
||||
|
||||
+ invoke-static {v5}, Lradiant/gestures/MiniPlayerTrackGestures;->textFeedbackModifier(Landroidx/compose/ui/Modifier;)Landroidx/compose/ui/Modifier; # move title/artist
|
||||
+
|
||||
+ move-result-object v5
|
||||
+
|
||||
.line 72
|
||||
invoke-virtual/range {v32 .. v32}, Landroidx/compose/foundation/layout/Arrangement;->getTop()Landroidx/compose/foundation/layout/Arrangement$Vertical;
|
||||
|
||||
--- a/com/tidal/android/feature/appscaffold/ui/MiniPlayerViewModel.smali
|
||||
+++ b/com/tidal/android/feature/appscaffold/ui/MiniPlayerViewModel.smali
|
||||
@@ -512,16 +512,16 @@
|
||||
.line 110
|
||||
invoke-virtual {p1, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
||||
|
||||
.line 111
|
||||
.line 112
|
||||
.line 113
|
||||
- move-result p1
|
||||
+ move-result v0
|
||||
|
||||
.line 114
|
||||
- if-eqz p1, :cond_f
|
||||
+ if-eqz v0, :cond_f
|
||||
|
||||
.line 115
|
||||
.line 116
|
||||
invoke-interface {v3}, Lbi/e;->i()Z
|
||||
|
||||
.line 117
|
||||
@@ -695,12 +695,34 @@
|
||||
.line 194
|
||||
:cond_e
|
||||
return-void
|
||||
|
||||
.line 195
|
||||
:cond_f
|
||||
+ sget-object v0, Lcom/tidal/android/feature/appscaffold/ui/r$c;->a:Lcom/tidal/android/feature/appscaffold/ui/r$c; # our synthetic previous-track event
|
||||
+
|
||||
+ invoke-virtual {p1, v0}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z # is this the swipe-previous event?
|
||||
+
|
||||
+ move-result p1
|
||||
+
|
||||
+ if-eqz p1, :unknown_event
|
||||
+
|
||||
+ invoke-interface {v3}, Lbi/e;->canSkipToPreviousOrRewind()Z
|
||||
+
|
||||
+ move-result p1
|
||||
+
|
||||
+ if-eqz p1, :previous_done
|
||||
+
|
||||
+ const/4 p1, 0x0
|
||||
+
|
||||
+ invoke-interface {v3, p1}, Lbi/e;->h(Z)V # false = previous/rewind
|
||||
+
|
||||
+ :previous_done
|
||||
+ return-void
|
||||
+
|
||||
+ :unknown_event
|
||||
invoke-static {}, Landroidx/navigation/f0;->a()V
|
||||
|
||||
.line 196
|
||||
.line 197
|
||||
.line 198
|
||||
return-void
|
||||
--- a/com/tidal/android/feature/appscaffold/ui/composable/g.smali
|
||||
+++ b/com/tidal/android/feature/appscaffold/ui/composable/g.smali
|
||||
@@ -24,12 +24,23 @@
|
||||
|
||||
|
||||
# virtual methods
|
||||
.method public final invoke()Ljava/lang/Object;
|
||||
.locals 2
|
||||
|
||||
+ invoke-static {}, Lradiant/gestures/MiniPlayerTrackGestures;->consumeTapOpenSuppression()Z # skip open-player if a horizontal skip-swipe just happened
|
||||
+
|
||||
+ move-result v0
|
||||
+
|
||||
+ if-eqz v0, :rl_continue_open
|
||||
+
|
||||
+ sget-object v0, Lkotlin/u;->a:Lkotlin/u;
|
||||
+
|
||||
+ return-object v0
|
||||
+
|
||||
+ :rl_continue_open
|
||||
.line 1
|
||||
iget-object v0, p0, Lcom/tidal/android/feature/appscaffold/ui/composable/g;->a:Lam0/l;
|
||||
|
||||
.line 2
|
||||
.line 3
|
||||
sget-object v1, Lcom/tidal/android/feature/appscaffold/ui/b$b;->a:Lcom/tidal/android/feature/appscaffold/ui/b$b;
|
||||
@@ -0,0 +1,76 @@
|
||||
# rl-locals: com/tidal/android/feature/appscaffold/ui/composable/i.smali b( 52
|
||||
--- a/com/tidal/android/feature/appscaffold/ui/composable/i.smali
|
||||
+++ b/com/tidal/android/feature/appscaffold/ui/composable/i.smali
|
||||
@@ -1691,6 +1691,14 @@
|
||||
|
||||
move-result-object v24
|
||||
|
||||
+ move-object/from16 v49, p5 # gesture expand lambda (AppScaffold Function1 param)
|
||||
+
|
||||
+ move-object/from16 v50, v24 # SheetState
|
||||
+
|
||||
+ const/16 v51, __RL_MINI_PLAYER_SWIPE_UP_DRAG__ # Enable Drag option
|
||||
+
|
||||
+ invoke-static/range {v49 .. v51}, Lradiant/gestures/MiniPlayerGestures;->configure(Lam0/l;Landroidx/compose/material3/SheetState;Z)V # wire swipe-up to expand the sheet
|
||||
+
|
||||
.line 69
|
||||
invoke-static {}, Landroidx/compose/ui/platform/CompositionLocalsKt;->getLocalDensity()Landroidx/compose/runtime/ProvidableCompositionLocal;
|
||||
|
||||
--- a/com/tidal/android/feature/appscaffold/ui/composable/MiniPlayerKt.smali
|
||||
+++ b/com/tidal/android/feature/appscaffold/ui/composable/MiniPlayerKt.smali
|
||||
@@ -712,6 +712,22 @@
|
||||
|
||||
iget-object v3, v0, Lcom/tidal/android/feature/appscaffold/ui/t;->c:Lcom/tidal/android/feature/appscaffold/ui/MiniPlayerContract$PlayState;
|
||||
|
||||
+ iget-object v5, v0, Lcom/tidal/android/feature/appscaffold/ui/t;->a:Lcom/tidal/android/feature/appscaffold/ui/MiniPlayerContract$ItemType; # currently rendered mini player media type
|
||||
+
|
||||
+ sget-object v6, Lcom/tidal/android/feature/appscaffold/ui/MiniPlayerContract$ItemType;->Unknown:Lcom/tidal/android/feature/appscaffold/ui/MiniPlayerContract$ItemType; # Unknown = no media playing
|
||||
+
|
||||
+ if-ne v5, v6, :rl_has_media # prevent swipe up when nothing playing
|
||||
+
|
||||
+ const/4 v5, 0x0
|
||||
+
|
||||
+ goto :rl_set_media
|
||||
+
|
||||
+ :rl_has_media
|
||||
+ const/4 v5, 0x1
|
||||
+
|
||||
+ :rl_set_media
|
||||
+ invoke-static {v5}, Lradiant/gestures/MiniPlayerGestures;->setHasMiniPlayerMedia(Z)V
|
||||
+
|
||||
invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
||||
|
||||
const v4, -0x571456a1
|
||||
@@ -1215,6 +1231,10 @@
|
||||
|
||||
move-result-object v6
|
||||
|
||||
+ invoke-static {v6}, Lradiant/gestures/MiniPlayerGestures;->trackAreaModifier(Landroidx/compose/ui/Modifier;)Landroidx/compose/ui/Modifier; # attach swipe up listener
|
||||
+
|
||||
+ move-result-object v6
|
||||
+
|
||||
.line 38
|
||||
sget-object v21, Landroidx/compose/ui/Alignment;->Companion:Landroidx/compose/ui/Alignment$Companion;
|
||||
|
||||
@@ -1390,6 +1410,10 @@
|
||||
|
||||
move-result-object v6
|
||||
|
||||
+ invoke-static {v6}, Lradiant/gestures/MiniPlayerGestures;->feedbackModifier(Landroidx/compose/ui/Modifier;)Landroidx/compose/ui/Modifier; # move cover (swipe up feedback)
|
||||
+
|
||||
+ move-result-object v6
|
||||
+
|
||||
.line 63
|
||||
invoke-virtual/range {v22 .. v22}, Lcom/squareup/ui/market/core/theme/MarketStylesheet$c;->p0()Lf20/a;
|
||||
|
||||
@@ -1501,6 +1525,10 @@
|
||||
|
||||
move-result-object v5
|
||||
|
||||
+ invoke-static {v5}, Lradiant/gestures/MiniPlayerGestures;->feedbackModifier(Landroidx/compose/ui/Modifier;)Landroidx/compose/ui/Modifier; # move title/artist (swipe up feedback)
|
||||
+
|
||||
+ move-result-object v5
|
||||
+
|
||||
.line 72
|
||||
invoke-virtual/range {v32 .. v32}, Landroidx/compose/foundation/layout/Arrangement;->getTop()Landroidx/compose/foundation/layout/Arrangement$Vertical;
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
--- a/androidx/compose/material3/ModalBottomSheetKt$ModalBottomSheet$4$1.smali
|
||||
+++ b/androidx/compose/material3/ModalBottomSheetKt$ModalBottomSheet$4$1.smali
|
||||
@@ -212,6 +212,12 @@
|
||||
.line 24
|
||||
iget-object p1, p0, Landroidx/compose/material3/ModalBottomSheetKt$ModalBottomSheet$4$1;->$sheetState:Landroidx/compose/material3/SheetState;
|
||||
|
||||
+ invoke-static {p1}, Lradiant/gestures/MiniPlayerGestures;->suppressAutoShow(Landroidx/compose/material3/SheetState;)Z # avoid Material3 show() taking over manual drag
|
||||
+
|
||||
+ move-result v1
|
||||
+
|
||||
+ if-nez v1, :skip_show
|
||||
+
|
||||
.line 25
|
||||
.line 26
|
||||
iput v2, p0, Landroidx/compose/material3/ModalBottomSheetKt$ModalBottomSheet$4$1;->label:I
|
||||
@@ -232,6 +238,7 @@
|
||||
.line 34
|
||||
return-object v0
|
||||
|
||||
+ :skip_show
|
||||
.line 35
|
||||
:cond_2
|
||||
:goto_0
|
||||
--- a/androidx/compose/material3/ModalBottomSheetKt.smali
|
||||
+++ b/androidx/compose/material3/ModalBottomSheetKt.smali
|
||||
@@ -1288,12 +1288,18 @@
|
||||
|
||||
.line 33
|
||||
invoke-interface {v5, v12}, Landroidx/compose/runtime/Composer;->updateRememberedValue(Ljava/lang/Object;)V
|
||||
|
||||
.line 34
|
||||
:cond_47
|
||||
+ move-object v14, v12 # settle callback
|
||||
+
|
||||
+ check-cast v14, Lam0/l; # to Function1
|
||||
+
|
||||
+ invoke-static {v13, v14}, Lradiant/gestures/MiniPlayerGestures;->setSettleCallback(Landroidx/compose/material3/SheetState;Lam0/l;)V # reuse native settle animation on release
|
||||
+
|
||||
move-object/from16 v32, v12
|
||||
|
||||
check-cast v32, Lam0/l;
|
||||
|
||||
.line 35
|
||||
invoke-interface {v5}, Landroidx/compose/runtime/Composer;->rememberedValue()Ljava/lang/Object;
|
||||
--- a/androidx/compose/material3/SheetDefaultsKt.smali
|
||||
+++ b/androidx/compose/material3/SheetDefaultsKt.smali
|
||||
@@ -98,7 +98,7 @@
|
||||
const/4 v2, 0x0
|
||||
|
||||
.line 16
|
||||
- const/16 v3, 0x12c
|
||||
+ const/16 v3, 0x64 # 100ms
|
||||
|
||||
.line 17
|
||||
.line 18
|
||||
Reference in New Issue
Block a user