mirror of
https://github.com/meowarex/rl-mobile.git
synced 2026-10-14 23:43:12 +11:00
refactor(swipe to queue): fixes and logic improvements
This commit is contained in:
1 parent
28bf8ad148
commit
05b6f4edb2
9 files changed
+17
-139
No files matched your search
@@ -74,6 +74,8 @@
|
||||
|
||||
div-int/lit8 v8, v8, 0xa
|
||||
|
||||
if-lez v8, :draw_background
|
||||
|
||||
if-eqz p5, :draw_alpha
|
||||
|
||||
if-lt v5, v8, :below_threshold
|
||||
|
||||
@@ -260,6 +260,8 @@
|
||||
# / 10 = 30% of row width (30% threshold)
|
||||
div-int/lit8 v8, v8, 0xa
|
||||
|
||||
if-lez v8, :disarm
|
||||
|
||||
if-lt v5, v8, :disarm
|
||||
|
||||
iget-object v8, p0, Lradiant/SwipeToQueue;->resolver:Lradiant/swipe/QueueRowResolver;
|
||||
@@ -307,6 +309,8 @@
|
||||
|
||||
div-int/lit8 v8, v8, 0xa
|
||||
|
||||
if-lez v8, :draw_background
|
||||
|
||||
const/16 v9, 0x40
|
||||
|
||||
mul-int/2addr v9, v5
|
||||
@@ -470,15 +474,9 @@
|
||||
|
||||
if-eqz v1, :dispatch
|
||||
|
||||
iget-object v2, p0, Lradiant/SwipeToQueue;->resolver:Lradiant/swipe/QueueRowResolver;
|
||||
iget-object v0, p0, Lradiant/SwipeToQueue;->resolver:Lradiant/swipe/QueueRowResolver;
|
||||
|
||||
invoke-interface {v2, v1}, Lradiant/swipe/QueueRowResolver;->isValid(Lradiant/swipe/QueueRequest;)Z
|
||||
|
||||
move-result v0
|
||||
|
||||
if-eqz v0, :dispatch
|
||||
|
||||
invoke-interface {v2, v1}, Lradiant/swipe/QueueRowResolver;->execute(Lradiant/swipe/QueueRequest;)V
|
||||
invoke-interface {v0, v1}, Lradiant/swipe/QueueRowResolver;->execute(Lradiant/swipe/QueueRequest;)V
|
||||
|
||||
:dispatch
|
||||
invoke-super {p0, p1, p2}, Landroidx/recyclerview/widget/ItemTouchHelper$SimpleCallback;->onSelectedChanged(Landroidx/recyclerview/widget/RecyclerView$ViewHolder;I)V
|
||||
|
||||
@@ -371,25 +371,6 @@
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public isValid(Lradiant/swipe/QueueRequest;)Z
|
||||
.locals 1
|
||||
|
||||
invoke-direct {p0, p1}, Lradiant/swipe/DynamicTrackResolver;->currentTrack(Lradiant/swipe/QueueRequest;)Lcom/aspiro/wamp/model/Track;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
if-eqz p1, :invalid
|
||||
|
||||
const/4 p1, 0x1
|
||||
|
||||
return p1
|
||||
|
||||
:invalid
|
||||
const/4 p1, 0x0
|
||||
|
||||
return p1
|
||||
.end method
|
||||
|
||||
.method public resolve(Landroidx/recyclerview/widget/RecyclerView;Landroidx/recyclerview/widget/RecyclerView$ViewHolder;)Lradiant/swipe/QueueRequest;
|
||||
.locals 5
|
||||
|
||||
@@ -456,6 +437,8 @@
|
||||
|
||||
iget-object v0, p1, Lo6/b;->c:Lo6/b$a;
|
||||
|
||||
if-eqz v0, :invalid
|
||||
|
||||
iget v0, v0, Lo6/b$a;->d:I
|
||||
|
||||
new-instance v1, Lradiant/swipe/QueueRequest;
|
||||
|
||||
@@ -47,12 +47,6 @@
|
||||
.method public execute(Lradiant/swipe/QueueRequest;)V
|
||||
.locals 3
|
||||
|
||||
invoke-virtual {p0, p1}, Lradiant/swipe/FavoriteTracksResolver;->isValid(Lradiant/swipe/QueueRequest;)Z
|
||||
|
||||
move-result v0
|
||||
|
||||
if-eqz v0, :done
|
||||
|
||||
iget-object v0, p0, Lradiant/swipe/FavoriteTracksResolver;->fragment:Ljava/lang/ref/WeakReference;
|
||||
|
||||
invoke-virtual {v0}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;
|
||||
@@ -75,51 +69,6 @@
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public isValid(Lradiant/swipe/QueueRequest;)Z
|
||||
.locals 4
|
||||
|
||||
if-eqz p1, :invalid
|
||||
|
||||
iget-object v0, p1, Lradiant/swipe/QueueRequest;->media:Ljava/lang/Object;
|
||||
|
||||
instance-of v1, v0, Lcom/aspiro/wamp/model/FavoriteTrack;
|
||||
|
||||
if-eqz v1, :invalid
|
||||
|
||||
iget-object v1, p0, Lradiant/swipe/FavoriteTracksResolver;->fragment:Ljava/lang/ref/WeakReference;
|
||||
|
||||
invoke-virtual {v1}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
check-cast v1, Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/FavoriteTracksFragment;
|
||||
|
||||
if-eqz v1, :invalid
|
||||
|
||||
iget v2, p1, Lradiant/swipe/QueueRequest;->position:I
|
||||
|
||||
check-cast v0, Lcom/aspiro/wamp/model/FavoriteTrack;
|
||||
|
||||
invoke-virtual {v0}, Lcom/aspiro/wamp/model/MediaItem;->getId()I
|
||||
|
||||
move-result v3
|
||||
|
||||
iget p1, p1, Lradiant/swipe/QueueRequest;->id:I
|
||||
|
||||
if-ne v3, p1, :invalid
|
||||
|
||||
invoke-virtual {v1, v2, v0}, Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/FavoriteTracksFragment;->Y(ILcom/aspiro/wamp/model/FavoriteTrack;)Z
|
||||
|
||||
move-result p1
|
||||
|
||||
return p1
|
||||
|
||||
:invalid
|
||||
const/4 p1, 0x0
|
||||
|
||||
return p1
|
||||
.end method
|
||||
|
||||
.method public resolve(Landroidx/recyclerview/widget/RecyclerView;Landroidx/recyclerview/widget/RecyclerView$ViewHolder;)Lradiant/swipe/QueueRequest;
|
||||
.locals 5
|
||||
|
||||
|
||||
@@ -174,25 +174,6 @@
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public isValid(Lradiant/swipe/QueueRequest;)Z
|
||||
.locals 1
|
||||
|
||||
invoke-direct {p0, p1}, Lradiant/swipe/MyAlbumsResolver;->current(Lradiant/swipe/QueueRequest;)Lzc/a;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
if-eqz p1, :invalid
|
||||
|
||||
const/4 p1, 0x1
|
||||
|
||||
return p1
|
||||
|
||||
:invalid
|
||||
const/4 p1, 0x0
|
||||
|
||||
return p1
|
||||
.end method
|
||||
|
||||
.method public resolve(Landroidx/recyclerview/widget/RecyclerView;Landroidx/recyclerview/widget/RecyclerView$ViewHolder;)Lradiant/swipe/QueueRequest;
|
||||
.locals 6
|
||||
|
||||
|
||||
@@ -210,25 +210,6 @@
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public isValid(Lradiant/swipe/QueueRequest;)Z
|
||||
.locals 1
|
||||
|
||||
invoke-direct {p0, p1}, Lradiant/swipe/MyMixesAndRadioResolver;->current(Lradiant/swipe/QueueRequest;)Lve/a;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
if-eqz p1, :invalid
|
||||
|
||||
const/4 p1, 0x1
|
||||
|
||||
return p1
|
||||
|
||||
:invalid
|
||||
const/4 p1, 0x0
|
||||
|
||||
return p1
|
||||
.end method
|
||||
|
||||
.method public resolve(Landroidx/recyclerview/widget/RecyclerView;Landroidx/recyclerview/widget/RecyclerView$ViewHolder;)Lradiant/swipe/QueueRequest;
|
||||
.locals 5
|
||||
|
||||
|
||||
@@ -193,25 +193,6 @@
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public isValid(Lradiant/swipe/QueueRequest;)Z
|
||||
.locals 1
|
||||
|
||||
invoke-direct {p0, p1}, Lradiant/swipe/MyPlaylistsResolver;->current(Lradiant/swipe/QueueRequest;)Lcf/b;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
if-eqz p1, :invalid
|
||||
|
||||
const/4 p1, 0x1
|
||||
|
||||
return p1
|
||||
|
||||
:invalid
|
||||
const/4 p1, 0x0
|
||||
|
||||
return p1
|
||||
.end method
|
||||
|
||||
.method public resolve(Landroidx/recyclerview/widget/RecyclerView;Landroidx/recyclerview/widget/RecyclerView$ViewHolder;)Lradiant/swipe/QueueRequest;
|
||||
.locals 5
|
||||
|
||||
|
||||
@@ -7,8 +7,5 @@
|
||||
.method public abstract execute(Lradiant/swipe/QueueRequest;)V
|
||||
.end method
|
||||
|
||||
.method public abstract isValid(Lradiant/swipe/QueueRequest;)Z
|
||||
.end method
|
||||
|
||||
.method public abstract resolve(Landroidx/recyclerview/widget/RecyclerView;Landroidx/recyclerview/widget/RecyclerView$ViewHolder;)Lradiant/swipe/QueueRequest;
|
||||
.end method
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/com/aspiro/wamp/mycollection/subpages/favoritetracks/FavoriteTracksFragment.smali
|
||||
+++ b/com/aspiro/wamp/mycollection/subpages/favoritetracks/FavoriteTracksFragment.smali
|
||||
@@ -107,6 +107,118 @@
|
||||
@@ -107,6 +107,124 @@
|
||||
.end method
|
||||
|
||||
|
||||
@@ -70,6 +70,12 @@
|
||||
+
|
||||
+ if-eqz p1, :done
|
||||
+
|
||||
+ invoke-virtual {p1, v5}, Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/g0;->b(I)Lcom/aspiro/wamp/model/FavoriteTrack;
|
||||
+
|
||||
+ move-result-object p2
|
||||
+
|
||||
+ if-eqz p2, :done
|
||||
+
|
||||
+ iget-object v0, p1, Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/g0;->m:Lcom/tidal/android/navigation/NavigationInfo;
|
||||
+
|
||||
+ invoke-static {v0}, Lcom/aspiro/wamp/playqueue/source/model/b;->m(Lcom/tidal/android/navigation/NavigationInfo;)Lcom/aspiro/wamp/playqueue/source/model/MyItemsSource;
|
||||
|
||||
Reference in new issue
Block a user