mirror of
https://github.com/meowarex/rl-mobile.git
synced 2026-10-14 23:43:12 +11:00
feat(swipe to queue): queue collection albums support + dynamic legacy track lists
This commit is contained in:
1 parent
3aabcdff26
commit
89122deb0c
10 files changed
+1269
-101
No files matched your search
@@ -430,10 +430,16 @@
|
||||
],
|
||||
"extensionFiles": [
|
||||
"radiant/SwipeToQueue.smali",
|
||||
"radiant/QueueSwipeRemove.smali"
|
||||
"radiant/QueueSwipeRemove.smali",
|
||||
"radiant/swipe/QueueRequest.smali",
|
||||
"radiant/swipe/QueueRowResolver.smali",
|
||||
"radiant/swipe/QueueExecutor.smali",
|
||||
"radiant/swipe/FavoriteTracksResolver.smali",
|
||||
"radiant/swipe/DynamicTrackResolver.smali",
|
||||
"radiant/swipe/MyAlbumsResolver.smali"
|
||||
],
|
||||
"title": "Swipe to Queue",
|
||||
"description": "Swipe on tracks (in library/my tracks only for now) to add them to the play queue.",
|
||||
"description": "Swipe on tracks/albums to add them to the play queue.",
|
||||
"default": false,
|
||||
"advancedOptions": [
|
||||
{
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
# instance fields
|
||||
.field private final background:Landroid/graphics/drawable/ColorDrawable;
|
||||
|
||||
.field private final fragment:Ljava/lang/ref/WeakReference;
|
||||
|
||||
.field private final icon:Landroid/graphics/drawable/Drawable;
|
||||
|
||||
.field private pendingPosition:I
|
||||
.field private pendingRequest:Lradiant/swipe/QueueRequest;
|
||||
|
||||
.field private pendingTrack:Lcom/aspiro/wamp/model/FavoriteTrack;
|
||||
.field private releaseAllowed:Z
|
||||
|
||||
.field private final resolver:Lradiant/swipe/QueueRowResolver;
|
||||
|
||||
# direct methods
|
||||
.method static constructor <clinit>()V
|
||||
@@ -31,7 +31,7 @@
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method private constructor <init>(Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/FavoriteTracksFragment;Landroidx/recyclerview/widget/RecyclerView;)V
|
||||
.method private constructor <init>(Landroidx/recyclerview/widget/RecyclerView;Lradiant/swipe/QueueRowResolver;)V
|
||||
.locals 3
|
||||
|
||||
const/4 v0, 0x0
|
||||
@@ -41,13 +41,9 @@
|
||||
|
||||
invoke-direct {p0, v0, v1}, Landroidx/recyclerview/widget/ItemTouchHelper$SimpleCallback;-><init>(II)V
|
||||
|
||||
new-instance v0, Ljava/lang/ref/WeakReference;
|
||||
iput-object p2, p0, Lradiant/SwipeToQueue;->resolver:Lradiant/swipe/QueueRowResolver;
|
||||
|
||||
invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
|
||||
|
||||
iput-object v0, p0, Lradiant/SwipeToQueue;->fragment:Ljava/lang/ref/WeakReference;
|
||||
|
||||
invoke-virtual {p2}, Landroid/view/View;->getContext()Landroid/content/Context;
|
||||
invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
@@ -85,7 +81,7 @@
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public static install(Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/FavoriteTracksFragment;Landroidx/recyclerview/widget/RecyclerView;)V
|
||||
.method public static install(Landroidx/recyclerview/widget/RecyclerView;Lradiant/swipe/QueueRowResolver;)V
|
||||
.locals 4
|
||||
|
||||
if-eqz p0, :done
|
||||
@@ -94,7 +90,7 @@
|
||||
|
||||
sget-object v0, Lradiant/SwipeToQueue;->installed:Ljava/util/WeakHashMap;
|
||||
|
||||
invoke-virtual {v0, p1}, Ljava/util/WeakHashMap;->containsKey(Ljava/lang/Object;)Z
|
||||
invoke-virtual {v0, p0}, Ljava/util/WeakHashMap;->containsKey(Ljava/lang/Object;)Z
|
||||
|
||||
move-result v1
|
||||
|
||||
@@ -102,17 +98,32 @@
|
||||
|
||||
sget-object v1, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
|
||||
|
||||
invoke-virtual {v0, p1, v1}, Ljava/util/WeakHashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
||||
invoke-virtual {v0, p0, v1}, Ljava/util/WeakHashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
||||
|
||||
new-instance v0, Lradiant/SwipeToQueue;
|
||||
|
||||
invoke-direct {v0, p0, p1}, Lradiant/SwipeToQueue;-><init>(Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/FavoriteTracksFragment;Landroidx/recyclerview/widget/RecyclerView;)V
|
||||
invoke-direct {v0, p0, p1}, Lradiant/SwipeToQueue;-><init>(Landroidx/recyclerview/widget/RecyclerView;Lradiant/swipe/QueueRowResolver;)V
|
||||
|
||||
new-instance v1, Landroidx/recyclerview/widget/ItemTouchHelper;
|
||||
|
||||
invoke-direct {v1, v0}, Landroidx/recyclerview/widget/ItemTouchHelper;-><init>(Landroidx/recyclerview/widget/ItemTouchHelper$Callback;)V
|
||||
|
||||
invoke-virtual {v1, p1}, Landroidx/recyclerview/widget/ItemTouchHelper;->attachToRecyclerView(Landroidx/recyclerview/widget/RecyclerView;)V
|
||||
invoke-virtual {v1, p0}, Landroidx/recyclerview/widget/ItemTouchHelper;->attachToRecyclerView(Landroidx/recyclerview/widget/RecyclerView;)V
|
||||
|
||||
:done
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public static setReleaseAllowed(Landroidx/recyclerview/widget/ItemTouchHelper$Callback;Z)V
|
||||
.locals 1
|
||||
|
||||
instance-of v0, p0, Lradiant/SwipeToQueue;
|
||||
|
||||
if-eqz v0, :done
|
||||
|
||||
check-cast p0, Lradiant/SwipeToQueue;
|
||||
|
||||
iput-boolean p1, p0, Lradiant/SwipeToQueue;->releaseAllowed:Z
|
||||
|
||||
:done
|
||||
return-void
|
||||
@@ -120,52 +131,17 @@
|
||||
|
||||
# virtual methods
|
||||
.method public getSwipeDirs(Landroidx/recyclerview/widget/RecyclerView;Landroidx/recyclerview/widget/RecyclerView$ViewHolder;)I
|
||||
.locals 4
|
||||
.locals 2
|
||||
|
||||
iget-object v0, p0, Lradiant/SwipeToQueue;->pendingTrack:Lcom/aspiro/wamp/model/FavoriteTrack;
|
||||
iget-object v0, p0, Lradiant/SwipeToQueue;->pendingRequest:Lradiant/swipe/QueueRequest;
|
||||
|
||||
if-nez v0, :not_swipeable
|
||||
|
||||
instance-of v0, p2, Ln8/d;
|
||||
iget-object v0, p0, Lradiant/SwipeToQueue;->resolver:Lradiant/swipe/QueueRowResolver;
|
||||
|
||||
if-eqz v0, :not_swipeable
|
||||
invoke-interface {v0, p1, p2}, Lradiant/swipe/QueueRowResolver;->resolve(Landroidx/recyclerview/widget/RecyclerView;Landroidx/recyclerview/widget/RecyclerView$ViewHolder;)Lradiant/swipe/QueueRequest;
|
||||
|
||||
invoke-virtual {p2}, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->getBindingAdapterPosition()I
|
||||
|
||||
move-result v0
|
||||
|
||||
const/4 v1, -0x1
|
||||
|
||||
if-ne v0, v1, :has_position
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
return v0
|
||||
|
||||
:has_position
|
||||
check-cast p2, Ln8/d;
|
||||
|
||||
iget-object v1, p2, Ln8/d;->f:Lcom/aspiro/wamp/model/MediaItem;
|
||||
|
||||
instance-of v2, v1, Lcom/aspiro/wamp/model/FavoriteTrack;
|
||||
|
||||
if-eqz v2, :not_swipeable
|
||||
|
||||
iget-object v2, p0, Lradiant/SwipeToQueue;->fragment:Ljava/lang/ref/WeakReference;
|
||||
|
||||
invoke-virtual {v2}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;
|
||||
|
||||
move-result-object v2
|
||||
|
||||
check-cast v2, Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/FavoriteTracksFragment;
|
||||
|
||||
if-eqz v2, :not_swipeable
|
||||
|
||||
check-cast v1, Lcom/aspiro/wamp/model/FavoriteTrack;
|
||||
|
||||
invoke-virtual {v2, v0, v1}, Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/FavoriteTracksFragment;->Y(ILcom/aspiro/wamp/model/FavoriteTrack;)Z
|
||||
|
||||
move-result v0
|
||||
move-result-object v0
|
||||
|
||||
if-eqz v0, :not_swipeable
|
||||
|
||||
@@ -221,7 +197,7 @@
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
iput-object v0, p0, Lradiant/SwipeToQueue;->pendingTrack:Lcom/aspiro/wamp/model/FavoriteTrack;
|
||||
iput-object v0, p0, Lradiant/SwipeToQueue;->pendingRequest:Lradiant/swipe/QueueRequest;
|
||||
|
||||
goto :done
|
||||
|
||||
@@ -286,37 +262,19 @@
|
||||
|
||||
if-lt v5, v8, :disarm
|
||||
|
||||
invoke-virtual {p3}, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->getBindingAdapterPosition()I
|
||||
iget-object v8, p0, Lradiant/SwipeToQueue;->resolver:Lradiant/swipe/QueueRowResolver;
|
||||
|
||||
move-result v8
|
||||
iget-object v10, p0, Lradiant/SwipeToQueue;->pendingRequest:Lradiant/swipe/QueueRequest;
|
||||
|
||||
# RecyclerView.NO_POSITION.
|
||||
const/4 v9, -0x1
|
||||
if-nez v10, :draw_alpha
|
||||
|
||||
if-ne v8, v9, :resolve_action
|
||||
invoke-interface {v8, p2, p3}, Lradiant/swipe/QueueRowResolver;->resolve(Landroidx/recyclerview/widget/RecyclerView;Landroidx/recyclerview/widget/RecyclerView$ViewHolder;)Lradiant/swipe/QueueRequest;
|
||||
|
||||
goto :draw_alpha
|
||||
move-result-object v10
|
||||
|
||||
:resolve_action
|
||||
move-object v9, p3
|
||||
if-eqz v10, :draw_alpha
|
||||
|
||||
check-cast v9, Ln8/d;
|
||||
|
||||
iget-object v10, v9, Ln8/d;->f:Lcom/aspiro/wamp/model/MediaItem;
|
||||
|
||||
instance-of v11, v10, Lcom/aspiro/wamp/model/FavoriteTrack;
|
||||
|
||||
if-eqz v11, :draw_alpha
|
||||
|
||||
check-cast v10, Lcom/aspiro/wamp/model/FavoriteTrack;
|
||||
|
||||
iput v8, p0, Lradiant/SwipeToQueue;->pendingPosition:I
|
||||
|
||||
iget-object v8, p0, Lradiant/SwipeToQueue;->pendingTrack:Lcom/aspiro/wamp/model/FavoriteTrack;
|
||||
|
||||
iput-object v10, p0, Lradiant/SwipeToQueue;->pendingTrack:Lcom/aspiro/wamp/model/FavoriteTrack;
|
||||
|
||||
if-nez v8, :draw_alpha
|
||||
iput-object v10, p0, Lradiant/SwipeToQueue;->pendingRequest:Lradiant/swipe/QueueRequest;
|
||||
|
||||
# HapticFeedbackConstants.CLOCK_TICK
|
||||
const/4 v8, 0x4
|
||||
@@ -326,7 +284,7 @@
|
||||
goto :draw_alpha
|
||||
|
||||
:disarm
|
||||
iget-object v8, p0, Lradiant/SwipeToQueue;->pendingTrack:Lcom/aspiro/wamp/model/FavoriteTrack;
|
||||
iget-object v8, p0, Lradiant/SwipeToQueue;->pendingRequest:Lradiant/swipe/QueueRequest;
|
||||
|
||||
if-eqz v8, :clear_pending
|
||||
|
||||
@@ -338,7 +296,7 @@
|
||||
:clear_pending
|
||||
const/4 v8, 0x0
|
||||
|
||||
iput-object v8, p0, Lradiant/SwipeToQueue;->pendingTrack:Lcom/aspiro/wamp/model/FavoriteTrack;
|
||||
iput-object v8, p0, Lradiant/SwipeToQueue;->pendingRequest:Lradiant/swipe/QueueRequest;
|
||||
|
||||
goto :draw_alpha
|
||||
|
||||
@@ -491,34 +449,36 @@
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
iput-object v0, p0, Lradiant/SwipeToQueue;->pendingTrack:Lcom/aspiro/wamp/model/FavoriteTrack;
|
||||
iput-object v0, p0, Lradiant/SwipeToQueue;->pendingRequest:Lradiant/swipe/QueueRequest;
|
||||
|
||||
goto :dispatch
|
||||
|
||||
:release
|
||||
if-nez p2, :dispatch
|
||||
|
||||
iget v0, p0, Lradiant/SwipeToQueue;->pendingPosition:I
|
||||
|
||||
iget-object v1, p0, Lradiant/SwipeToQueue;->pendingTrack:Lcom/aspiro/wamp/model/FavoriteTrack;
|
||||
iget-boolean v0, p0, Lradiant/SwipeToQueue;->releaseAllowed:Z
|
||||
|
||||
const/4 v2, 0x0
|
||||
|
||||
iput-object v2, p0, Lradiant/SwipeToQueue;->pendingTrack:Lcom/aspiro/wamp/model/FavoriteTrack;
|
||||
iput-boolean v2, p0, Lradiant/SwipeToQueue;->releaseAllowed:Z
|
||||
|
||||
iget-object v1, p0, Lradiant/SwipeToQueue;->pendingRequest:Lradiant/swipe/QueueRequest;
|
||||
|
||||
iput-object v2, p0, Lradiant/SwipeToQueue;->pendingRequest:Lradiant/swipe/QueueRequest;
|
||||
|
||||
if-eqz v0, :dispatch
|
||||
|
||||
if-eqz v1, :dispatch
|
||||
|
||||
iget-object v2, p0, Lradiant/SwipeToQueue;->fragment:Ljava/lang/ref/WeakReference;
|
||||
iget-object v2, p0, Lradiant/SwipeToQueue;->resolver:Lradiant/swipe/QueueRowResolver;
|
||||
|
||||
invoke-virtual {v2}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;
|
||||
invoke-interface {v2, v1}, Lradiant/swipe/QueueRowResolver;->isValid(Lradiant/swipe/QueueRequest;)Z
|
||||
|
||||
move-result-object v2
|
||||
move-result v0
|
||||
|
||||
check-cast v2, Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/FavoriteTracksFragment;
|
||||
if-eqz v0, :dispatch
|
||||
|
||||
if-eqz v2, :dispatch
|
||||
|
||||
invoke-virtual {v2, v0, v1}, Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/FavoriteTracksFragment;->Z(ILcom/aspiro/wamp/model/FavoriteTrack;)V
|
||||
invoke-interface {v2, 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
|
||||
|
||||
@@ -0,0 +1,477 @@
|
||||
.class public final Lradiant/swipe/DynamicTrackResolver;
|
||||
.super Ljava/lang/Object;
|
||||
.source "DynamicTrackResolver.smali"
|
||||
|
||||
# interfaces
|
||||
.implements Lradiant/swipe/QueueRowResolver;
|
||||
|
||||
|
||||
# instance fields
|
||||
.field private final recycler:Ljava/lang/ref/WeakReference;
|
||||
|
||||
|
||||
# direct methods
|
||||
.method private constructor <init>(Landroidx/recyclerview/widget/RecyclerView;)V
|
||||
.locals 1
|
||||
|
||||
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||||
|
||||
new-instance v0, Ljava/lang/ref/WeakReference;
|
||||
|
||||
invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
|
||||
|
||||
iput-object v0, p0, Lradiant/swipe/DynamicTrackResolver;->recycler:Ljava/lang/ref/WeakReference;
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method private currentRow(Lradiant/swipe/QueueRequest;)Lo6/b;
|
||||
.locals 8
|
||||
|
||||
if-eqz p1, :invalid
|
||||
|
||||
iget-object v0, p1, Lradiant/swipe/QueueRequest;->media:Ljava/lang/Object;
|
||||
|
||||
instance-of v1, v0, Lo6/b;
|
||||
|
||||
if-eqz v1, :invalid
|
||||
|
||||
check-cast v0, Lo6/b;
|
||||
|
||||
iget-object v1, p0, Lradiant/swipe/DynamicTrackResolver;->recycler:Ljava/lang/ref/WeakReference;
|
||||
|
||||
invoke-virtual {v1}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
check-cast v1, Landroidx/recyclerview/widget/RecyclerView;
|
||||
|
||||
if-eqz v1, :invalid
|
||||
|
||||
invoke-virtual {v1}, Landroidx/recyclerview/widget/RecyclerView;->getAdapter()Landroidx/recyclerview/widget/RecyclerView$Adapter;
|
||||
|
||||
move-result-object v2
|
||||
|
||||
instance-of v1, v2, Lcom/tidal/android/core/adapterdelegate/c;
|
||||
|
||||
if-eqz v1, :invalid
|
||||
|
||||
check-cast v2, Lcom/tidal/android/core/adapterdelegate/c;
|
||||
|
||||
invoke-virtual {v2}, Landroidx/recyclerview/widget/ListAdapter;->getCurrentList()Ljava/util/List;
|
||||
|
||||
move-result-object v2
|
||||
|
||||
iget v3, p1, Lradiant/swipe/QueueRequest;->position:I
|
||||
|
||||
if-gez v3, :check_size
|
||||
|
||||
goto :invalid
|
||||
|
||||
:check_size
|
||||
invoke-interface {v2}, Ljava/util/List;->size()I
|
||||
|
||||
move-result v4
|
||||
|
||||
if-lt v3, v4, :read_row
|
||||
|
||||
goto :invalid
|
||||
|
||||
:read_row
|
||||
invoke-interface {v2, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
||||
|
||||
move-result-object v2
|
||||
|
||||
instance-of v3, v2, Lo6/b;
|
||||
|
||||
if-eqz v3, :invalid
|
||||
|
||||
check-cast v2, Lo6/b;
|
||||
|
||||
iget-object v3, v0, Lo6/b;->a:Lo6/i;
|
||||
|
||||
iget-object v4, v2, Lo6/b;->a:Lo6/i;
|
||||
|
||||
if-ne v3, v4, :invalid
|
||||
|
||||
iget-wide v3, v0, Lo6/b;->b:J
|
||||
|
||||
iget-wide v5, v2, Lo6/b;->b:J
|
||||
|
||||
cmp-long v7, v3, v5
|
||||
|
||||
if-nez v7, :invalid
|
||||
|
||||
iget-object v3, v0, Lo6/b;->c:Lo6/b$a;
|
||||
|
||||
iget-object v4, v2, Lo6/b;->c:Lo6/b$a;
|
||||
|
||||
if-eqz v3, :invalid
|
||||
|
||||
if-eqz v4, :invalid
|
||||
|
||||
iget v5, v3, Lo6/b$a;->d:I
|
||||
|
||||
iget v6, v4, Lo6/b$a;->d:I
|
||||
|
||||
iget v7, p1, Lradiant/swipe/QueueRequest;->id:I
|
||||
|
||||
if-ne v5, v7, :invalid
|
||||
|
||||
if-ne v6, v7, :invalid
|
||||
|
||||
iget v5, v3, Lo6/b$a;->o:I
|
||||
|
||||
iget v6, v4, Lo6/b$a;->o:I
|
||||
|
||||
if-ne v5, v6, :invalid
|
||||
|
||||
iget-object v5, v3, Lo6/b$a;->q:Ljava/lang/String;
|
||||
|
||||
iget-object v6, v4, Lo6/b$a;->q:Ljava/lang/String;
|
||||
|
||||
if-eq v5, v6, :valid
|
||||
|
||||
if-eqz v5, :invalid
|
||||
|
||||
invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
||||
|
||||
move-result v5
|
||||
|
||||
if-eqz v5, :invalid
|
||||
|
||||
:valid
|
||||
return-object v2
|
||||
|
||||
:invalid
|
||||
const/4 v0, 0x0
|
||||
|
||||
return-object v0
|
||||
.end method
|
||||
|
||||
.method private currentTrack(Lradiant/swipe/QueueRequest;)Lcom/aspiro/wamp/model/Track;
|
||||
.locals 7
|
||||
|
||||
invoke-direct {p0, p1}, Lradiant/swipe/DynamicTrackResolver;->currentRow(Lradiant/swipe/QueueRequest;)Lo6/b;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
if-eqz v0, :invalid
|
||||
|
||||
iget-object v1, v0, Lo6/b;->a:Lo6/i;
|
||||
|
||||
iget-object v2, v0, Lo6/b;->c:Lo6/b$a;
|
||||
|
||||
iget-object v3, v1, Lo6/i;->p:Ljava/util/LinkedHashMap;
|
||||
|
||||
iget-object v4, v2, Lo6/b$a;->q:Ljava/lang/String;
|
||||
|
||||
invoke-virtual {v3, v4}, Ljava/util/LinkedHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
||||
|
||||
move-result-object v3
|
||||
|
||||
instance-of v4, v3, Lcom/aspiro/wamp/dynamicpages/data/model/collection/TrackCollectionModule;
|
||||
|
||||
if-eqz v4, :invalid
|
||||
|
||||
check-cast v3, Lcom/aspiro/wamp/dynamicpages/data/model/collection/TrackCollectionModule;
|
||||
|
||||
invoke-virtual {v3}, Lcom/aspiro/wamp/dynamicpages/data/model/collection/MediaItemCollectionModule;->getFilteredPagedListItems()Ljava/util/List;
|
||||
|
||||
move-result-object v3
|
||||
|
||||
iget v4, v2, Lo6/b$a;->o:I
|
||||
|
||||
if-gez v4, :check_size
|
||||
|
||||
goto :invalid
|
||||
|
||||
:check_size
|
||||
invoke-interface {v3}, Ljava/util/List;->size()I
|
||||
|
||||
move-result v5
|
||||
|
||||
if-lt v4, v5, :read_track
|
||||
|
||||
goto :invalid
|
||||
|
||||
:read_track
|
||||
invoke-interface {v3, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
||||
|
||||
move-result-object v3
|
||||
|
||||
instance-of v4, v3, Lcom/aspiro/wamp/model/Track;
|
||||
|
||||
if-eqz v4, :invalid
|
||||
|
||||
check-cast v3, Lcom/aspiro/wamp/model/Track;
|
||||
|
||||
invoke-virtual {v3}, Lcom/aspiro/wamp/model/MediaItem;->getId()I
|
||||
|
||||
move-result v4
|
||||
|
||||
iget v5, p1, Lradiant/swipe/QueueRequest;->id:I
|
||||
|
||||
if-ne v4, v5, :invalid
|
||||
|
||||
iget-object v1, v1, Lo6/i;->g:Lcom/aspiro/wamp/model/AvailabilityInteractor;
|
||||
|
||||
invoke-interface {v1, v3}, Lcom/aspiro/wamp/model/AvailabilityInteractor;->getAvailability(Lcom/aspiro/wamp/model/MediaItem;)Lcom/aspiro/wamp/model/Availability$MediaItem;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
invoke-virtual {v1}, Lcom/aspiro/wamp/model/Availability$MediaItem;->isAvailable()Z
|
||||
|
||||
move-result v1
|
||||
|
||||
if-eqz v1, :invalid
|
||||
|
||||
return-object v3
|
||||
|
||||
:invalid
|
||||
const/4 v0, 0x0
|
||||
|
||||
return-object v0
|
||||
.end method
|
||||
|
||||
.method public static install(Landroidx/recyclerview/widget/RecyclerView;)V
|
||||
.locals 1
|
||||
|
||||
if-eqz p0, :done
|
||||
|
||||
new-instance v0, Lradiant/swipe/DynamicTrackResolver;
|
||||
|
||||
invoke-direct {v0, p0}, Lradiant/swipe/DynamicTrackResolver;-><init>(Landroidx/recyclerview/widget/RecyclerView;)V
|
||||
|
||||
invoke-static {p0, v0}, Lradiant/SwipeToQueue;->install(Landroidx/recyclerview/widget/RecyclerView;Lradiant/swipe/QueueRowResolver;)V
|
||||
|
||||
:done
|
||||
return-void
|
||||
.end method
|
||||
|
||||
|
||||
# virtual methods
|
||||
.method public execute(Lradiant/swipe/QueueRequest;)V
|
||||
.locals 8
|
||||
|
||||
invoke-direct {p0, p1}, Lradiant/swipe/DynamicTrackResolver;->currentRow(Lradiant/swipe/QueueRequest;)Lo6/b;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-direct {p0, p1}, Lradiant/swipe/DynamicTrackResolver;->currentTrack(Lradiant/swipe/QueueRequest;)Lcom/aspiro/wamp/model/Track;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
if-eqz v0, :done
|
||||
|
||||
if-eqz v1, :done
|
||||
|
||||
invoke-static {}, Lradiant/swipe/QueueExecutor;->hasActiveQueue()Z
|
||||
|
||||
move-result v2
|
||||
|
||||
if-nez v2, :append
|
||||
|
||||
iget-object v2, v0, Lo6/b;->a:Lo6/i;
|
||||
|
||||
iget-object v3, v0, Lo6/b;->c:Lo6/b$a;
|
||||
|
||||
iget v4, v3, Lo6/b$a;->o:I
|
||||
|
||||
iget-object v5, v3, Lo6/b$a;->q:Ljava/lang/String;
|
||||
|
||||
invoke-virtual {v2, v4, v5}, Lo6/i;->e(ILjava/lang/String;)V
|
||||
|
||||
goto :done
|
||||
|
||||
:append
|
||||
iget-object v0, v0, Lo6/b;->a:Lo6/i;
|
||||
|
||||
iget-object v2, v0, Lo6/i;->p:Ljava/util/LinkedHashMap;
|
||||
|
||||
iget-object v3, p1, Lradiant/swipe/QueueRequest;->media:Ljava/lang/Object;
|
||||
|
||||
check-cast v3, Lo6/b;
|
||||
|
||||
iget-object v3, v3, Lo6/b;->c:Lo6/b$a;
|
||||
|
||||
iget-object v3, v3, Lo6/b$a;->q:Ljava/lang/String;
|
||||
|
||||
invoke-virtual {v2, v3}, Ljava/util/LinkedHashMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
||||
|
||||
move-result-object v2
|
||||
|
||||
check-cast v2, Lcom/aspiro/wamp/dynamicpages/data/model/collection/TrackCollectionModule;
|
||||
|
||||
new-instance v3, Lcom/aspiro/wamp/eventtracking/model/ContextualMetadata;
|
||||
|
||||
invoke-virtual {v2}, Lcom/aspiro/wamp/dynamicpages/data/model/Module;->getPageId()Ljava/lang/String;
|
||||
|
||||
move-result-object v4
|
||||
|
||||
invoke-virtual {v2}, Lcom/aspiro/wamp/dynamicpages/data/model/Module;->getId()Ljava/lang/String;
|
||||
|
||||
move-result-object v5
|
||||
|
||||
invoke-virtual {v2}, Lcom/aspiro/wamp/dynamicpages/data/model/Module;->getPosition()I
|
||||
|
||||
move-result v6
|
||||
|
||||
invoke-static {v6}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
||||
|
||||
move-result-object v6
|
||||
|
||||
invoke-direct {v3, v4, v5, v6}, Lcom/aspiro/wamp/eventtracking/model/ContextualMetadata;-><init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
|
||||
|
||||
invoke-virtual {v1}, Lcom/aspiro/wamp/model/MediaItem;->getId()I
|
||||
|
||||
move-result v4
|
||||
|
||||
invoke-static {v4}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
||||
|
||||
move-result-object v4
|
||||
|
||||
invoke-virtual {v2}, Lcom/aspiro/wamp/dynamicpages/data/model/Module;->getTitle()Ljava/lang/String;
|
||||
|
||||
move-result-object v5
|
||||
|
||||
iget-object v6, v0, Lo6/i;->m:Lcom/tidal/android/navigation/NavigationInfo;
|
||||
|
||||
invoke-virtual {v2}, Lcom/aspiro/wamp/dynamicpages/data/model/Module;->getSelfLink()Ljava/lang/String;
|
||||
|
||||
move-result-object v7
|
||||
|
||||
invoke-static {v7}, Lcom/aspiro/wamp/playqueue/source/model/ItemSource$NavigationType$a;->a(Ljava/lang/String;)Lcom/aspiro/wamp/playqueue/source/model/ItemSource$NavigationType;
|
||||
|
||||
move-result-object v7
|
||||
|
||||
invoke-static {v4, v5, v6, v7}, Lcom/aspiro/wamp/playqueue/source/model/b;->j(Ljava/lang/String;Ljava/lang/String;Lcom/tidal/android/navigation/NavigationInfo;Lcom/aspiro/wamp/playqueue/source/model/ItemSource$NavigationType;)Lcom/aspiro/wamp/playqueue/source/model/ItemSource;
|
||||
|
||||
move-result-object v4
|
||||
|
||||
invoke-virtual {v4, v1}, Lcom/aspiro/wamp/playqueue/source/model/Source;->addSourceItem(Lcom/aspiro/wamp/model/MediaItem;)V
|
||||
|
||||
iget-object v5, p0, Lradiant/swipe/DynamicTrackResolver;->recycler:Ljava/lang/ref/WeakReference;
|
||||
|
||||
invoke-virtual {v5}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;
|
||||
|
||||
move-result-object v5
|
||||
|
||||
check-cast v5, Landroidx/recyclerview/widget/RecyclerView;
|
||||
|
||||
if-eqz v5, :done
|
||||
|
||||
invoke-virtual {v5}, Landroid/view/View;->getContext()Landroid/content/Context;
|
||||
|
||||
move-result-object v5
|
||||
|
||||
invoke-static {v5, v1, v3, v4}, Lradiant/swipe/QueueExecutor;->track(Landroid/content/Context;Lcom/aspiro/wamp/model/Track;Lcom/aspiro/wamp/eventtracking/model/ContextualMetadata;Lcom/aspiro/wamp/playqueue/source/model/Source;)Z
|
||||
|
||||
:done
|
||||
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
|
||||
|
||||
instance-of v0, p2, Lp7/a$a;
|
||||
|
||||
if-eqz v0, :invalid
|
||||
|
||||
iget-object v0, p0, Lradiant/swipe/DynamicTrackResolver;->recycler:Ljava/lang/ref/WeakReference;
|
||||
|
||||
invoke-virtual {v0}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
if-ne v0, p1, :invalid
|
||||
|
||||
invoke-virtual {p2}, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->getBindingAdapterPosition()I
|
||||
|
||||
move-result p2
|
||||
|
||||
const/4 v0, -0x1
|
||||
|
||||
if-ne p2, v0, :has_position
|
||||
|
||||
goto :invalid
|
||||
|
||||
:has_position
|
||||
invoke-virtual {p1}, Landroidx/recyclerview/widget/RecyclerView;->getAdapter()Landroidx/recyclerview/widget/RecyclerView$Adapter;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
instance-of v0, p1, Lcom/tidal/android/core/adapterdelegate/c;
|
||||
|
||||
if-eqz v0, :invalid
|
||||
|
||||
check-cast p1, Lcom/tidal/android/core/adapterdelegate/c;
|
||||
|
||||
invoke-virtual {p1}, Landroidx/recyclerview/widget/ListAdapter;->getCurrentList()Ljava/util/List;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
if-gez p2, :check_size
|
||||
|
||||
goto :invalid
|
||||
|
||||
:check_size
|
||||
invoke-interface {p1}, Ljava/util/List;->size()I
|
||||
|
||||
move-result v0
|
||||
|
||||
if-lt p2, v0, :read_row
|
||||
|
||||
goto :invalid
|
||||
|
||||
:read_row
|
||||
invoke-interface {p1, p2}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
instance-of v0, p1, Lo6/b;
|
||||
|
||||
if-eqz v0, :invalid
|
||||
|
||||
check-cast p1, Lo6/b;
|
||||
|
||||
iget-object v0, p1, Lo6/b;->c:Lo6/b$a;
|
||||
|
||||
iget v0, v0, Lo6/b$a;->d:I
|
||||
|
||||
new-instance v1, Lradiant/swipe/QueueRequest;
|
||||
|
||||
invoke-direct {v1, p2, p1, v0}, Lradiant/swipe/QueueRequest;-><init>(ILjava/lang/Object;I)V
|
||||
|
||||
invoke-direct {p0, v1}, Lradiant/swipe/DynamicTrackResolver;->currentTrack(Lradiant/swipe/QueueRequest;)Lcom/aspiro/wamp/model/Track;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
if-eqz p1, :invalid
|
||||
|
||||
return-object v1
|
||||
|
||||
:invalid
|
||||
const/4 p1, 0x0
|
||||
|
||||
return-object p1
|
||||
.end method
|
||||
@@ -0,0 +1,181 @@
|
||||
.class public final Lradiant/swipe/FavoriteTracksResolver;
|
||||
.super Ljava/lang/Object;
|
||||
.source "FavoriteTracksResolver.smali"
|
||||
|
||||
# interfaces
|
||||
.implements Lradiant/swipe/QueueRowResolver;
|
||||
|
||||
|
||||
# instance fields
|
||||
.field private final fragment:Ljava/lang/ref/WeakReference;
|
||||
|
||||
|
||||
# direct methods
|
||||
.method private constructor <init>(Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/FavoriteTracksFragment;)V
|
||||
.locals 1
|
||||
|
||||
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||||
|
||||
new-instance v0, Ljava/lang/ref/WeakReference;
|
||||
|
||||
invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
|
||||
|
||||
iput-object v0, p0, Lradiant/swipe/FavoriteTracksResolver;->fragment:Ljava/lang/ref/WeakReference;
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method public static install(Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/FavoriteTracksFragment;Landroidx/recyclerview/widget/RecyclerView;)V
|
||||
.locals 1
|
||||
|
||||
if-eqz p0, :done
|
||||
|
||||
if-eqz p1, :done
|
||||
|
||||
new-instance v0, Lradiant/swipe/FavoriteTracksResolver;
|
||||
|
||||
invoke-direct {v0, p0}, Lradiant/swipe/FavoriteTracksResolver;-><init>(Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/FavoriteTracksFragment;)V
|
||||
|
||||
invoke-static {p1, v0}, Lradiant/SwipeToQueue;->install(Landroidx/recyclerview/widget/RecyclerView;Lradiant/swipe/QueueRowResolver;)V
|
||||
|
||||
:done
|
||||
return-void
|
||||
.end method
|
||||
|
||||
|
||||
# virtual methods
|
||||
.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;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
check-cast v0, Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/FavoriteTracksFragment;
|
||||
|
||||
if-eqz v0, :done
|
||||
|
||||
iget v1, p1, Lradiant/swipe/QueueRequest;->position:I
|
||||
|
||||
iget-object v2, p1, Lradiant/swipe/QueueRequest;->media:Ljava/lang/Object;
|
||||
|
||||
check-cast v2, Lcom/aspiro/wamp/model/FavoriteTrack;
|
||||
|
||||
invoke-virtual {v0, v1, v2}, Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/FavoriteTracksFragment;->Z(ILcom/aspiro/wamp/model/FavoriteTrack;)V
|
||||
|
||||
:done
|
||||
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
|
||||
|
||||
instance-of p1, p2, Ln8/d;
|
||||
|
||||
if-eqz p1, :invalid
|
||||
|
||||
invoke-virtual {p2}, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->getBindingAdapterPosition()I
|
||||
|
||||
move-result p1
|
||||
|
||||
const/4 v0, -0x1
|
||||
|
||||
if-ne p1, v0, :has_position
|
||||
|
||||
goto :invalid
|
||||
|
||||
:has_position
|
||||
check-cast p2, Ln8/d;
|
||||
|
||||
iget-object p2, p2, Ln8/d;->f:Lcom/aspiro/wamp/model/MediaItem;
|
||||
|
||||
instance-of v0, p2, Lcom/aspiro/wamp/model/FavoriteTrack;
|
||||
|
||||
if-eqz v0, :invalid
|
||||
|
||||
check-cast p2, Lcom/aspiro/wamp/model/FavoriteTrack;
|
||||
|
||||
iget-object v0, p0, Lradiant/swipe/FavoriteTracksResolver;->fragment:Ljava/lang/ref/WeakReference;
|
||||
|
||||
invoke-virtual {v0}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
check-cast v0, Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/FavoriteTracksFragment;
|
||||
|
||||
if-eqz v0, :invalid
|
||||
|
||||
invoke-virtual {v0, p1, p2}, Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/FavoriteTracksFragment;->Y(ILcom/aspiro/wamp/model/FavoriteTrack;)Z
|
||||
|
||||
move-result v0
|
||||
|
||||
if-eqz v0, :invalid
|
||||
|
||||
invoke-virtual {p2}, Lcom/aspiro/wamp/model/MediaItem;->getId()I
|
||||
|
||||
move-result v0
|
||||
|
||||
new-instance v1, Lradiant/swipe/QueueRequest;
|
||||
|
||||
invoke-direct {v1, p1, p2, v0}, Lradiant/swipe/QueueRequest;-><init>(ILjava/lang/Object;I)V
|
||||
|
||||
return-object v1
|
||||
|
||||
:invalid
|
||||
const/4 p1, 0x0
|
||||
|
||||
return-object p1
|
||||
.end method
|
||||
@@ -0,0 +1,267 @@
|
||||
.class public final Lradiant/swipe/MyAlbumsResolver;
|
||||
.super Ljava/lang/Object;
|
||||
.source "MyAlbumsResolver.smali"
|
||||
|
||||
# interfaces
|
||||
.implements Lradiant/swipe/QueueRowResolver;
|
||||
|
||||
|
||||
# instance fields
|
||||
.field private final fragment:Ljava/lang/ref/WeakReference;
|
||||
|
||||
|
||||
# direct methods
|
||||
.method private constructor <init>(Lcom/aspiro/wamp/mycollection/subpages/albums/myalbums/MyAlbumsView;)V
|
||||
.locals 1
|
||||
|
||||
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||||
|
||||
new-instance v0, Ljava/lang/ref/WeakReference;
|
||||
|
||||
invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
|
||||
|
||||
iput-object v0, p0, Lradiant/swipe/MyAlbumsResolver;->fragment:Ljava/lang/ref/WeakReference;
|
||||
|
||||
return-void
|
||||
.end method
|
||||
|
||||
.method private current(Lradiant/swipe/QueueRequest;)Lzc/a;
|
||||
.locals 7
|
||||
|
||||
if-eqz p1, :invalid
|
||||
|
||||
iget-object v0, p0, Lradiant/swipe/MyAlbumsResolver;->fragment:Ljava/lang/ref/WeakReference;
|
||||
|
||||
invoke-virtual {v0}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
check-cast v0, Lcom/aspiro/wamp/mycollection/subpages/albums/myalbums/MyAlbumsView;
|
||||
|
||||
if-eqz v0, :invalid
|
||||
|
||||
iget-object v1, v0, Lcom/aspiro/wamp/mycollection/subpages/albums/myalbums/MyAlbumsView;->h:Lad/f;
|
||||
|
||||
if-eqz v1, :invalid
|
||||
|
||||
invoke-virtual {v0}, Lcom/aspiro/wamp/mycollection/subpages/albums/myalbums/MyAlbumsView;->N()La50/d;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-virtual {v0}, Landroidx/recyclerview/widget/ListAdapter;->getCurrentList()Ljava/util/List;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
iget v1, p1, Lradiant/swipe/QueueRequest;->position:I
|
||||
|
||||
if-gez v1, :check_size
|
||||
|
||||
goto :invalid
|
||||
|
||||
:check_size
|
||||
invoke-interface {v0}, Ljava/util/List;->size()I
|
||||
|
||||
move-result v2
|
||||
|
||||
if-lt v1, v2, :read_item
|
||||
|
||||
goto :invalid
|
||||
|
||||
:read_item
|
||||
invoke-interface {v0, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
instance-of v1, v0, Lzc/a;
|
||||
|
||||
if-eqz v1, :invalid
|
||||
|
||||
check-cast v0, Lzc/a;
|
||||
|
||||
iget-boolean v1, v0, Lzc/a;->k:Z
|
||||
|
||||
if-eqz v1, :invalid
|
||||
|
||||
iget-object v1, v0, Lzc/a;->b:Lcom/aspiro/wamp/model/Album;
|
||||
|
||||
invoke-virtual {v1}, Lcom/aspiro/wamp/model/Album;->getId()I
|
||||
|
||||
move-result v1
|
||||
|
||||
iget v2, p1, Lradiant/swipe/QueueRequest;->id:I
|
||||
|
||||
if-ne v1, v2, :invalid
|
||||
|
||||
return-object v0
|
||||
|
||||
:invalid
|
||||
const/4 v0, 0x0
|
||||
|
||||
return-object v0
|
||||
.end method
|
||||
|
||||
.method public static install(Lcom/aspiro/wamp/mycollection/subpages/albums/myalbums/MyAlbumsView;Landroidx/recyclerview/widget/RecyclerView;)V
|
||||
.locals 1
|
||||
|
||||
if-eqz p0, :done
|
||||
|
||||
if-eqz p1, :done
|
||||
|
||||
new-instance v0, Lradiant/swipe/MyAlbumsResolver;
|
||||
|
||||
invoke-direct {v0, p0}, Lradiant/swipe/MyAlbumsResolver;-><init>(Lcom/aspiro/wamp/mycollection/subpages/albums/myalbums/MyAlbumsView;)V
|
||||
|
||||
invoke-static {p1, v0}, Lradiant/SwipeToQueue;->install(Landroidx/recyclerview/widget/RecyclerView;Lradiant/swipe/QueueRowResolver;)V
|
||||
|
||||
:done
|
||||
return-void
|
||||
.end method
|
||||
|
||||
|
||||
# virtual methods
|
||||
.method public execute(Lradiant/swipe/QueueRequest;)V
|
||||
.locals 7
|
||||
|
||||
invoke-direct {p0, p1}, Lradiant/swipe/MyAlbumsResolver;->current(Lradiant/swipe/QueueRequest;)Lzc/a;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
if-eqz p1, :done
|
||||
|
||||
iget-object v0, p0, Lradiant/swipe/MyAlbumsResolver;->fragment:Ljava/lang/ref/WeakReference;
|
||||
|
||||
invoke-virtual {v0}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
check-cast v0, Lcom/aspiro/wamp/mycollection/subpages/albums/myalbums/MyAlbumsView;
|
||||
|
||||
if-eqz v0, :done
|
||||
|
||||
iget-object v1, v0, Lcom/aspiro/wamp/mycollection/subpages/albums/myalbums/MyAlbumsView;->c:Lfd/c;
|
||||
|
||||
if-eqz v1, :done
|
||||
|
||||
iget-object v2, v1, Lfd/c;->a:Lx40/a;
|
||||
|
||||
instance-of v3, v2, Lh4/a;
|
||||
|
||||
if-eqz v3, :done
|
||||
|
||||
check-cast v2, Lh4/a;
|
||||
|
||||
invoke-virtual {v0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
||||
|
||||
move-result-object v3
|
||||
|
||||
iget-object v4, p1, Lzc/a;->b:Lcom/aspiro/wamp/model/Album;
|
||||
|
||||
iget-object v5, v1, Lfd/c;->d:Lcom/aspiro/wamp/eventtracking/model/ContextualMetadata;
|
||||
|
||||
iget-object v6, v1, Lfd/c;->c:Lcom/tidal/android/navigation/NavigationInfo;
|
||||
|
||||
invoke-static {v3, v4, v5, v6, v2}, Lradiant/swipe/QueueExecutor;->album(Landroid/content/Context;Lcom/aspiro/wamp/model/Album;Lcom/aspiro/wamp/eventtracking/model/ContextualMetadata;Lcom/tidal/android/navigation/NavigationInfo;Lh4/a;)Lio/reactivex/disposables/Disposable;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
if-eqz p1, :done
|
||||
|
||||
iget-object v0, v0, Lcom/aspiro/wamp/mycollection/subpages/albums/myalbums/MyAlbumsView;->j:Lio/reactivex/disposables/CompositeDisposable;
|
||||
|
||||
invoke-virtual {v0, p1}, Lio/reactivex/disposables/CompositeDisposable;->add(Lio/reactivex/disposables/Disposable;)Z
|
||||
|
||||
:done
|
||||
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
|
||||
|
||||
instance-of v0, p2, Lbd/d$a;
|
||||
|
||||
if-eqz v0, :invalid
|
||||
|
||||
invoke-virtual {p2}, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->getBindingAdapterPosition()I
|
||||
|
||||
move-result p2
|
||||
|
||||
const/4 v0, -0x1
|
||||
|
||||
if-ne p2, v0, :has_position
|
||||
|
||||
goto :invalid
|
||||
|
||||
:has_position
|
||||
invoke-virtual {p1}, Landroidx/recyclerview/widget/RecyclerView;->getAdapter()Landroidx/recyclerview/widget/RecyclerView$Adapter;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
instance-of v0, p1, La50/d;
|
||||
|
||||
if-eqz v0, :invalid
|
||||
|
||||
check-cast p1, La50/d;
|
||||
|
||||
invoke-virtual {p1}, Landroidx/recyclerview/widget/ListAdapter;->getCurrentList()Ljava/util/List;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
invoke-interface {p1}, Ljava/util/List;->size()I
|
||||
|
||||
move-result v0
|
||||
|
||||
if-lt p2, v0, :read_item
|
||||
|
||||
goto :invalid
|
||||
|
||||
:read_item
|
||||
invoke-interface {p1, p2}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
instance-of v0, p1, Lzc/a;
|
||||
|
||||
if-eqz v0, :invalid
|
||||
|
||||
check-cast p1, Lzc/a;
|
||||
|
||||
iget-boolean v0, p1, Lzc/a;->k:Z
|
||||
|
||||
if-eqz v0, :invalid
|
||||
|
||||
iget-object v0, p1, Lzc/a;->b:Lcom/aspiro/wamp/model/Album;
|
||||
|
||||
invoke-virtual {v0}, Lcom/aspiro/wamp/model/Album;->getId()I
|
||||
|
||||
move-result v1
|
||||
|
||||
new-instance v2, Lradiant/swipe/QueueRequest;
|
||||
|
||||
invoke-direct {v2, p2, v0, v1}, Lradiant/swipe/QueueRequest;-><init>(ILjava/lang/Object;I)V
|
||||
|
||||
return-object v2
|
||||
|
||||
:invalid
|
||||
const/4 p1, 0x0
|
||||
|
||||
return-object p1
|
||||
.end method
|
||||
@@ -0,0 +1,180 @@
|
||||
.class public final Lradiant/swipe/QueueExecutor;
|
||||
.super Ljava/lang/Object;
|
||||
.source "QueueExecutor.smali"
|
||||
|
||||
|
||||
# direct methods
|
||||
.method public static album(Landroid/content/Context;Lcom/aspiro/wamp/model/Album;Lcom/aspiro/wamp/eventtracking/model/ContextualMetadata;Lcom/tidal/android/navigation/NavigationInfo;Lh4/a;)Lio/reactivex/disposables/Disposable;
|
||||
.locals 8
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
if-eqz p0, :done
|
||||
|
||||
if-eqz p1, :done
|
||||
|
||||
invoke-static {}, Lcom/aspiro/wamp/App$a;->a()Lcom/aspiro/wamp/App;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
invoke-virtual {v1}, Lcom/aspiro/wamp/App;->e()Le5/c;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
check-cast v1, Le5/z$n2;
|
||||
|
||||
invoke-virtual {v1}, Le5/z$n2;->r2()Lcom/aspiro/wamp/playqueue/g1;
|
||||
|
||||
move-result-object v2
|
||||
|
||||
invoke-virtual {v2}, Lcom/aspiro/wamp/playqueue/g1;->a()Lcom/aspiro/wamp/player/d;
|
||||
|
||||
move-result-object v2
|
||||
|
||||
invoke-virtual {v2}, Lcom/aspiro/wamp/player/d;->b()Lcom/aspiro/wamp/model/MediaItemParent;
|
||||
|
||||
move-result-object v2
|
||||
|
||||
if-eqz v2, :play
|
||||
|
||||
if-eqz p4, :done
|
||||
|
||||
iget-object v2, p4, Lh4/a;->b:Lo3/a$a;
|
||||
|
||||
invoke-interface {v2, p1, p2, p3}, Lo3/a$a;->a(Lcom/aspiro/wamp/model/Album;Lcom/aspiro/wamp/eventtracking/model/ContextualMetadata;Lcom/tidal/android/navigation/NavigationInfo;)Lo3/a;
|
||||
|
||||
move-result-object v2
|
||||
|
||||
iget-object v2, v2, Lo3/a;->e:Lc3/i$a;
|
||||
|
||||
invoke-interface {v2, p1, p2, p3}, Lc3/i$a;->a(Lcom/aspiro/wamp/model/Album;Lcom/aspiro/wamp/eventtracking/model/ContextualMetadata;Lcom/tidal/android/navigation/NavigationInfo;)Lc3/i;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
instance-of p2, p0, Landroidx/fragment/app/FragmentActivity;
|
||||
|
||||
if-eqz p2, :done
|
||||
|
||||
check-cast p0, Landroidx/fragment/app/FragmentActivity;
|
||||
|
||||
invoke-virtual {p1, p0}, Lc3/i;->b(Landroidx/fragment/app/FragmentActivity;)V
|
||||
|
||||
goto :done
|
||||
|
||||
:play
|
||||
invoke-virtual {v1}, Le5/z$n2;->u3()Lcom/aspiro/wamp/playback/f;
|
||||
|
||||
move-result-object p0
|
||||
|
||||
invoke-virtual {p1}, Lcom/aspiro/wamp/model/Album;->getId()I
|
||||
|
||||
move-result p1
|
||||
|
||||
const/4 p2, 0x1
|
||||
|
||||
invoke-virtual {p0, p1, p3, p2, v0}, Lcom/aspiro/wamp/playback/f;->a(ILcom/tidal/android/navigation/NavigationInfo;ZLjava/lang/String;)Lhu/akarnokd/rxjava/interop/f;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
:done
|
||||
return-object v0
|
||||
.end method
|
||||
|
||||
.method public static hasActiveQueue()Z
|
||||
.locals 2
|
||||
|
||||
invoke-static {}, Lcom/aspiro/wamp/App$a;->a()Lcom/aspiro/wamp/App;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-virtual {v0}, Lcom/aspiro/wamp/App;->e()Le5/c;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
check-cast v0, Le5/z$n2;
|
||||
|
||||
invoke-virtual {v0}, Le5/z$n2;->r2()Lcom/aspiro/wamp/playqueue/g1;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-virtual {v0}, Lcom/aspiro/wamp/playqueue/g1;->a()Lcom/aspiro/wamp/player/d;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
invoke-virtual {v0}, Lcom/aspiro/wamp/player/d;->b()Lcom/aspiro/wamp/model/MediaItemParent;
|
||||
|
||||
move-result-object v0
|
||||
|
||||
if-eqz v0, :empty
|
||||
|
||||
const/4 v0, 0x1
|
||||
|
||||
return v0
|
||||
|
||||
:empty
|
||||
const/4 v0, 0x0
|
||||
|
||||
return v0
|
||||
.end method
|
||||
|
||||
.method public static track(Landroid/content/Context;Lcom/aspiro/wamp/model/Track;Lcom/aspiro/wamp/eventtracking/model/ContextualMetadata;Lcom/aspiro/wamp/playqueue/source/model/Source;)Z
|
||||
.locals 2
|
||||
|
||||
const/4 v0, 0x0
|
||||
|
||||
:unwrap_context
|
||||
instance-of v1, p0, Landroidx/fragment/app/FragmentActivity;
|
||||
|
||||
if-nez v1, :has_activity
|
||||
|
||||
instance-of v1, p0, Landroid/content/ContextWrapper;
|
||||
|
||||
if-eqz v1, :done
|
||||
|
||||
move-object v1, p0
|
||||
|
||||
check-cast v1, Landroid/content/ContextWrapper;
|
||||
|
||||
invoke-virtual {v1}, Landroid/content/ContextWrapper;->getBaseContext()Landroid/content/Context;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
if-eq v1, p0, :done
|
||||
|
||||
move-object p0, v1
|
||||
|
||||
goto :unwrap_context
|
||||
|
||||
:has_activity
|
||||
|
||||
invoke-static {}, Lcom/aspiro/wamp/App$a;->a()Lcom/aspiro/wamp/App;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
invoke-virtual {v1}, Lcom/aspiro/wamp/App;->e()Le5/c;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
check-cast v1, Le5/z$n2;
|
||||
|
||||
iget-object v1, v1, Le5/z$n2;->k9:Ldagger/internal/f;
|
||||
|
||||
invoke-interface {v1}, Lql0/a;->get()Ljava/lang/Object;
|
||||
|
||||
move-result-object v1
|
||||
|
||||
check-cast v1, Lm3/f$a;
|
||||
|
||||
invoke-interface {v1, p1, p2, p3}, Lm3/f$a;->a(Lcom/aspiro/wamp/model/Track;Lcom/aspiro/wamp/eventtracking/model/ContextualMetadata;Lcom/aspiro/wamp/playqueue/source/model/Source;)Lm3/f;
|
||||
|
||||
move-result-object p1
|
||||
|
||||
check-cast p0, Landroidx/fragment/app/FragmentActivity;
|
||||
|
||||
invoke-virtual {p1, p0}, Lm3/f;->b(Landroidx/fragment/app/FragmentActivity;)V
|
||||
|
||||
const/4 v0, 0x1
|
||||
|
||||
:done
|
||||
return v0
|
||||
.end method
|
||||
@@ -0,0 +1,27 @@
|
||||
.class public final Lradiant/swipe/QueueRequest;
|
||||
.super Ljava/lang/Object;
|
||||
.source "QueueRequest.smali"
|
||||
|
||||
|
||||
# instance fields
|
||||
.field public final id:I
|
||||
|
||||
.field public final media:Ljava/lang/Object;
|
||||
|
||||
.field public final position:I
|
||||
|
||||
|
||||
# direct methods
|
||||
.method public constructor <init>(ILjava/lang/Object;I)V
|
||||
.locals 0
|
||||
|
||||
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||||
|
||||
iput p1, p0, Lradiant/swipe/QueueRequest;->position:I
|
||||
|
||||
iput-object p2, p0, Lradiant/swipe/QueueRequest;->media:Ljava/lang/Object;
|
||||
|
||||
iput p3, p0, Lradiant/swipe/QueueRequest;->id:I
|
||||
|
||||
return-void
|
||||
.end method
|
||||
@@ -0,0 +1,14 @@
|
||||
.class public interface abstract Lradiant/swipe/QueueRowResolver;
|
||||
.super Ljava/lang/Object;
|
||||
.source "QueueRowResolver.smali"
|
||||
|
||||
|
||||
# virtual methods
|
||||
.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
|
||||
@@ -430,10 +430,16 @@
|
||||
],
|
||||
"extensionFiles": [
|
||||
"radiant/SwipeToQueue.smali",
|
||||
"radiant/QueueSwipeRemove.smali"
|
||||
"radiant/QueueSwipeRemove.smali",
|
||||
"radiant/swipe/QueueRequest.smali",
|
||||
"radiant/swipe/QueueRowResolver.smali",
|
||||
"radiant/swipe/QueueExecutor.smali",
|
||||
"radiant/swipe/FavoriteTracksResolver.smali",
|
||||
"radiant/swipe/DynamicTrackResolver.smali",
|
||||
"radiant/swipe/MyAlbumsResolver.smali"
|
||||
],
|
||||
"title": "Swipe to Queue",
|
||||
"description": "Swipe on tracks (in library/my tracks only for now) to add them to the play queue.",
|
||||
"description": "Swipe on tracks/albums to add them to the play queue.",
|
||||
"default": false,
|
||||
"advancedOptions": [
|
||||
{
|
||||
|
||||
@@ -131,11 +131,61 @@
|
||||
+
|
||||
+ iget-object p1, p1, Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/m;->f:Landroidx/recyclerview/widget/RecyclerView;
|
||||
+
|
||||
+ invoke-static {p0, p1}, Lradiant/SwipeToQueue;->install(Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/FavoriteTracksFragment;Landroidx/recyclerview/widget/RecyclerView;)V
|
||||
+ invoke-static {p0, p1}, Lradiant/swipe/FavoriteTracksResolver;->install(Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/FavoriteTracksFragment;Landroidx/recyclerview/widget/RecyclerView;)V
|
||||
|
||||
.line 226
|
||||
.line 227
|
||||
invoke-virtual {p0}, Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/FavoriteTracksFragment;->N()Lcom/aspiro/wamp/mycollection/subpages/favoritetracks/n;
|
||||
--- a/p7/a.smali
|
||||
+++ b/p7/a.smali
|
||||
@@ -33,3 +33,11 @@
|
||||
.end method
|
||||
|
||||
+.method public b(Landroidx/recyclerview/widget/RecyclerView;)V
|
||||
+ .locals 0
|
||||
+
|
||||
+ invoke-static {p1}, Lradiant/swipe/DynamicTrackResolver;->install(Landroidx/recyclerview/widget/RecyclerView;)V
|
||||
+
|
||||
+ return-void
|
||||
+.end method
|
||||
+
|
||||
.method public final c(Ljava/lang/Object;Landroidx/recyclerview/widget/RecyclerView$ViewHolder;)V
|
||||
--- a/com/aspiro/wamp/mycollection/subpages/albums/myalbums/MyAlbumsView.smali
|
||||
+++ b/com/aspiro/wamp/mycollection/subpages/albums/myalbums/MyAlbumsView.smali
|
||||
@@ -1286,6 +1286,8 @@
|
||||
.line 23
|
||||
invoke-static {v0, p2}, Lcom/tidal/android/feature/appscaffold/ui/recyclerview/b;->a(Landroidx/lifecycle/LifecycleOwner;Landroidx/recyclerview/widget/RecyclerView;)Lcom/tidal/android/feature/appscaffold/ui/recyclerview/a;
|
||||
|
||||
+ invoke-static {p0, p2}, Lradiant/swipe/MyAlbumsResolver;->install(Lcom/aspiro/wamp/mycollection/subpages/albums/myalbums/MyAlbumsView;Landroidx/recyclerview/widget/RecyclerView;)V
|
||||
+
|
||||
.line 24
|
||||
.line 25
|
||||
.line 26
|
||||
--- a/androidx/recyclerview/widget/ItemTouchHelper$2.smali
|
||||
+++ b/androidx/recyclerview/widget/ItemTouchHelper$2.smali
|
||||
@@ -773,7 +773,11 @@
|
||||
const/4 v5, 0x1
|
||||
|
||||
.line 54
|
||||
- if-eq p1, v5, :cond_9
|
||||
+ if-ne p1, v5, :rl_not_explicit_release
|
||||
+ iget-object v6, v2, Landroidx/recyclerview/widget/ItemTouchHelper;->mCallback:Landroidx/recyclerview/widget/ItemTouchHelper$Callback;
|
||||
+ invoke-static {v6, v5}, Lradiant/SwipeToQueue;->setReleaseAllowed(Landroidx/recyclerview/widget/ItemTouchHelper$Callback;Z)V
|
||||
+ goto :cond_9
|
||||
+ :rl_not_explicit_release
|
||||
|
||||
.line 55
|
||||
.line 56
|
||||
@@ -867,6 +871,9 @@
|
||||
|
||||
.line 97
|
||||
:cond_6
|
||||
+ const/4 v6, 0x0
|
||||
+ iget-object v1, v2, Landroidx/recyclerview/widget/ItemTouchHelper;->mCallback:Landroidx/recyclerview/widget/ItemTouchHelper$Callback;
|
||||
+ invoke-static {v1, v6}, Lradiant/SwipeToQueue;->setReleaseAllowed(Landroidx/recyclerview/widget/ItemTouchHelper$Callback;Z)V
|
||||
iget-object p1, v2, Landroidx/recyclerview/widget/ItemTouchHelper;->mVelocityTracker:Landroid/view/VelocityTracker;
|
||||
|
||||
.line 98
|
||||
--- a/h4/a.smali
|
||||
+++ b/h4/a.smali
|
||||
@@ -931,1 +931,46 @@
|
||||
|
||||
Reference in new issue
Block a user