mirror of
https://github.com/meowarex/rl-mobile.git
synced 2026-10-15 07:53: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
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user