Files
rl-mobile/patches/lyrics-rl-api.patch
T
2026-10-11 18:18:12 +00:00

78 lines
3.0 KiB
Diff

--- a/com/tidal/android/feature/playerscreen/ui/PlayerViewModel.smali
+++ b/com/tidal/android/feature/playerscreen/ui/PlayerViewModel.smali
@@ -1459,6 +1459,8 @@
.line 105
check-cast v1, Lcom/aspiro/wamp/model/Track;
+ invoke-static {v0, v1}, Lradiant/RLAPILyricsHook;->onWampTrack(Lcom/tidal/android/feature/playerscreen/ui/PlayerViewModel;Lcom/aspiro/wamp/model/Track;)V # RL API lyrics hook
+
.line 106
.line 107
invoke-virtual {v1}, Lcom/aspiro/wamp/model/MediaItem;->getId()I
@@ -1745,7 +1747,11 @@
.line 235
.line 236
.line 237
- if-nez v9, :cond_a
+ invoke-static {v0}, Lradiant/RLAPILyricsHook;->shouldKeepOpen(Lcom/tidal/android/feature/playerscreen/ui/PlayerViewModel;)Z
+ move-result v20
+ if-nez v20, :cond_a # keep visibility only for RL state owned by this ViewModel
+ :rl_native_visibility
+ if-nez v9, :cond_a
.line 238
.line 239
@@ -2437,7 +2443,12 @@
.line 568
:goto_c
+ invoke-static {v0}, Lradiant/RLAPILyricsHook;->isOwner(Lcom/tidal/android/feature/playerscreen/ui/PlayerViewModel;)Z
+ move-result v20
+ if-nez v20, :rl_keep_n2 # only preserve RL content owned by this ViewModel
+ :rl_set_n2
invoke-interface {v9, v1}, Lkotlinx/coroutines/flow/MutableStateFlow;->setValue(Ljava/lang/Object;)V
+ :rl_keep_n2
.line 569
.line 570
@@ -2486,7 +2497,12 @@
.line 591
.line 592
+ invoke-static {v0}, Lradiant/RLAPILyricsHook;->shouldKeepOpen(Lcom/tidal/android/feature/playerscreen/ui/PlayerViewModel;)Z
+ move-result v20
+ if-nez v20, :rl_keep_o # only preserve visibility owned by this ViewModel
+ :rl_set_o
invoke-interface {v1, v5}, Lkotlinx/coroutines/flow/MutableStateFlow;->setValue(Ljava/lang/Object;)V
+ :rl_keep_o
.line 593
.line 594
@@ -2515,7 +2531,12 @@
.line 606
.line 607
+ invoke-static {v0}, Lradiant/RLAPILyricsHook;->isOwner(Lcom/tidal/android/feature/playerscreen/ui/PlayerViewModel;)Z
+ move-result v20
+ if-nez v20, :rl_keep_n # only preserve RL content owned by this ViewModel
+ :rl_set_n
invoke-interface {v1, v6}, Lkotlinx/coroutines/flow/MutableStateFlow;->setValue(Ljava/lang/Object;)V
+ :rl_keep_n
.line 608
.line 609
--- a/com/tidal/android/feature/playerscreen/ui/PlayerViewModel$special$$inlined$mapNotNull$1$2.smali
+++ b/com/tidal/android/feature/playerscreen/ui/PlayerViewModel$special$$inlined$mapNotNull$1$2.smali
@@ -2256,6 +2256,11 @@
.line 1040
.line 1041
move-result v34
+ invoke-static {v1}, Lradiant/RLAPILyricsHook;->isOwner(Lcom/tidal/android/feature/playerscreen/ui/PlayerViewModel;)Z
+ move-result v4
+ if-eqz v4, :rl_hl_done # ignore non-RL state or state owned by an obsolete ViewModel
+ const/16 v34, 0x1 # RL lyrics active = force hasLyrics so the sparkle stays
+ :rl_hl_done
.line 1042
iget-object v4, v1, Lcom/tidal/android/feature/playerscreen/ui/PlayerViewModel;->S:Lkotlinx/coroutines/flow/MutableStateFlow;