mirror of
https://github.com/meowarex/rl-mobile.git
synced 2026-10-14 23:43:12 +11:00
feat(swipe to queue): queue search items support
This commit is contained in:
1 parent
05b6f4edb2
commit
dcf207d307
7 files changed
+1414
-2
No files matched your search
@@ -438,7 +438,11 @@
|
|||||||
"radiant/swipe/DynamicTrackResolver.smali",
|
"radiant/swipe/DynamicTrackResolver.smali",
|
||||||
"radiant/swipe/MyAlbumsResolver.smali",
|
"radiant/swipe/MyAlbumsResolver.smali",
|
||||||
"radiant/swipe/MyPlaylistsResolver.smali",
|
"radiant/swipe/MyPlaylistsResolver.smali",
|
||||||
"radiant/swipe/MyMixesAndRadioResolver.smali"
|
"radiant/swipe/MyMixesAndRadioResolver.smali",
|
||||||
|
"radiant/swipe/SearchAlbumsResolver.smali",
|
||||||
|
"radiant/swipe/SearchPlaylistsResolver.smali",
|
||||||
|
"radiant/swipe/PlaylistItemsResolver.smali",
|
||||||
|
"radiant/swipe/UnifiedSearchResolver.smali"
|
||||||
],
|
],
|
||||||
"title": "Swipe to Queue",
|
"title": "Swipe to Queue",
|
||||||
"description": "Swipe on tracks/albums/playlists to add them to the play queue.",
|
"description": "Swipe on tracks/albums/playlists to add them to the play queue.",
|
||||||
|
|||||||
@@ -0,0 +1,392 @@
|
|||||||
|
.class public final Lradiant/swipe/PlaylistItemsResolver;
|
||||||
|
.super Ljava/lang/Object;
|
||||||
|
.source "PlaylistItemsResolver.smali"
|
||||||
|
|
||||||
|
# interfaces
|
||||||
|
.implements Lradiant/swipe/QueueRowResolver;
|
||||||
|
|
||||||
|
# instance fields
|
||||||
|
.field private final recycler:Ljava/lang/ref/WeakReference;
|
||||||
|
|
||||||
|
# direct methods
|
||||||
|
.method private constructor <init>(Lcom/aspiro/wamp/playlist/ui/items/PlaylistItemCollectionView;)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/PlaylistItemsResolver;->recycler:Ljava/lang/ref/WeakReference;
|
||||||
|
|
||||||
|
return-void
|
||||||
|
.end method
|
||||||
|
|
||||||
|
.method private current(Lradiant/swipe/QueueRequest;)Ljava/lang/Object;
|
||||||
|
.locals 7
|
||||||
|
|
||||||
|
if-eqz p1, :invalid
|
||||||
|
|
||||||
|
iget-object v0, p1, Lradiant/swipe/QueueRequest;->media:Ljava/lang/Object;
|
||||||
|
|
||||||
|
iget-object v1, p0, Lradiant/swipe/PlaylistItemsResolver;->recycler: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/playlist/ui/items/PlaylistItemCollectionView;
|
||||||
|
if-eqz v1, :invalid
|
||||||
|
|
||||||
|
invoke-virtual {v1}, Landroidx/recyclerview/widget/RecyclerView;->getAdapter()Landroidx/recyclerview/widget/RecyclerView$Adapter;
|
||||||
|
move-result-object v2
|
||||||
|
instance-of v3, v2, La50/b;
|
||||||
|
if-eqz v3, :invalid
|
||||||
|
check-cast v2, La50/b;
|
||||||
|
iget-object v2, v2, La50/b;->b:Ljava/util/ArrayList;
|
||||||
|
|
||||||
|
iget v3, p1, Lradiant/swipe/QueueRequest;->position:I
|
||||||
|
if-gez v3, :check_size
|
||||||
|
goto :invalid
|
||||||
|
|
||||||
|
:check_size
|
||||||
|
invoke-virtual {v2}, Ljava/util/ArrayList;->size()I
|
||||||
|
move-result v4
|
||||||
|
if-lt v3, v4, :read_item
|
||||||
|
goto :invalid
|
||||||
|
|
||||||
|
:read_item
|
||||||
|
invoke-virtual {v2, v3}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
||||||
|
move-result-object v2
|
||||||
|
|
||||||
|
instance-of v3, v0, Lcom/aspiro/wamp/playlist/viewmodel/item/TrackViewModel;
|
||||||
|
if-eqz v3, :captured_podcast
|
||||||
|
instance-of v3, v2, Lcom/aspiro/wamp/playlist/viewmodel/item/TrackViewModel;
|
||||||
|
if-eqz v3, :invalid
|
||||||
|
goto :member
|
||||||
|
|
||||||
|
:captured_podcast
|
||||||
|
instance-of v3, v0, Lcom/aspiro/wamp/playlist/viewmodel/item/PodcastTrackViewModel;
|
||||||
|
if-eqz v3, :captured_suggestion
|
||||||
|
instance-of v3, v2, Lcom/aspiro/wamp/playlist/viewmodel/item/PodcastTrackViewModel;
|
||||||
|
if-eqz v3, :invalid
|
||||||
|
|
||||||
|
:member
|
||||||
|
move-object v3, v0
|
||||||
|
check-cast v3, Lcom/aspiro/wamp/playlist/viewmodel/item/PlaylistItemViewModel;
|
||||||
|
move-object v4, v2
|
||||||
|
check-cast v4, Lcom/aspiro/wamp/playlist/viewmodel/item/PlaylistItemViewModel;
|
||||||
|
|
||||||
|
invoke-interface {v4}, Lcom/aspiro/wamp/playlist/viewmodel/item/PlaylistItemViewModel;->getShouldHideItem()Z
|
||||||
|
move-result v5
|
||||||
|
if-nez v5, :invalid
|
||||||
|
|
||||||
|
invoke-interface {v4}, Lcom/aspiro/wamp/playlist/viewmodel/item/PlaylistItemViewModel;->getAvailability()Lcom/aspiro/wamp/model/Availability$MediaItem;
|
||||||
|
move-result-object v5
|
||||||
|
invoke-virtual {v5}, Lcom/aspiro/wamp/model/Availability$MediaItem;->isAvailable()Z
|
||||||
|
move-result v5
|
||||||
|
if-eqz v5, :invalid
|
||||||
|
|
||||||
|
invoke-interface {v3}, Lcom/aspiro/wamp/playlist/viewmodel/item/PlaylistItemViewModel;->getUuid()Ljava/lang/String;
|
||||||
|
move-result-object v5
|
||||||
|
invoke-interface {v4}, Lcom/aspiro/wamp/playlist/viewmodel/item/PlaylistItemViewModel;->getUuid()Ljava/lang/String;
|
||||||
|
move-result-object v6
|
||||||
|
if-eq v5, v6, :member_identity
|
||||||
|
if-eqz v5, :invalid
|
||||||
|
invoke-virtual {v5, v6}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
||||||
|
move-result v5
|
||||||
|
if-eqz v5, :invalid
|
||||||
|
|
||||||
|
:member_identity
|
||||||
|
invoke-static {v0}, Lradiant/swipe/PlaylistItemsResolver;->track(Ljava/lang/Object;)Lcom/aspiro/wamp/model/Track;
|
||||||
|
move-result-object v0
|
||||||
|
invoke-static {v2}, Lradiant/swipe/PlaylistItemsResolver;->track(Ljava/lang/Object;)Lcom/aspiro/wamp/model/Track;
|
||||||
|
move-result-object v3
|
||||||
|
if-eqz v0, :invalid
|
||||||
|
if-eqz v3, :invalid
|
||||||
|
|
||||||
|
invoke-virtual {v0}, Lcom/aspiro/wamp/model/MediaItem;->getIndex()I
|
||||||
|
move-result v4
|
||||||
|
invoke-virtual {v3}, Lcom/aspiro/wamp/model/MediaItem;->getIndex()I
|
||||||
|
move-result v5
|
||||||
|
if-ne v4, v5, :invalid
|
||||||
|
goto :check_track
|
||||||
|
|
||||||
|
:captured_suggestion
|
||||||
|
instance-of v3, v0, Lcom/aspiro/wamp/playlist/viewmodel/item/SuggestedTrackViewModel;
|
||||||
|
if-eqz v3, :invalid
|
||||||
|
instance-of v3, v2, Lcom/aspiro/wamp/playlist/viewmodel/item/SuggestedTrackViewModel;
|
||||||
|
if-eqz v3, :invalid
|
||||||
|
|
||||||
|
move-object v3, v2
|
||||||
|
check-cast v3, Lcom/aspiro/wamp/playlist/viewmodel/item/SuggestedTrackViewModel;
|
||||||
|
invoke-virtual {v3}, Lcom/aspiro/wamp/playlist/viewmodel/item/SuggestedTrackViewModel;->getAvailability()Lcom/aspiro/wamp/model/Availability;
|
||||||
|
move-result-object v3
|
||||||
|
invoke-interface {v3}, Lcom/aspiro/wamp/model/Availability;->isAvailable()Z
|
||||||
|
move-result v3
|
||||||
|
if-eqz v3, :invalid
|
||||||
|
|
||||||
|
invoke-static {v0}, Lradiant/swipe/PlaylistItemsResolver;->track(Ljava/lang/Object;)Lcom/aspiro/wamp/model/Track;
|
||||||
|
move-result-object v0
|
||||||
|
invoke-static {v2}, Lradiant/swipe/PlaylistItemsResolver;->track(Ljava/lang/Object;)Lcom/aspiro/wamp/model/Track;
|
||||||
|
move-result-object v3
|
||||||
|
if-eqz v0, :invalid
|
||||||
|
if-eqz v3, :invalid
|
||||||
|
|
||||||
|
:check_track
|
||||||
|
invoke-virtual {v0}, Lcom/aspiro/wamp/model/MediaItem;->getId()I
|
||||||
|
move-result v4
|
||||||
|
invoke-virtual {v3}, Lcom/aspiro/wamp/model/MediaItem;->getId()I
|
||||||
|
move-result v5
|
||||||
|
if-ne v4, v5, :invalid
|
||||||
|
iget v6, p1, Lradiant/swipe/QueueRequest;->id:I
|
||||||
|
if-ne v5, v6, :invalid
|
||||||
|
|
||||||
|
iget-object v4, v1, Lcom/aspiro/wamp/playlist/ui/items/PlaylistItemCollectionView;->d:Lcom/aspiro/wamp/model/AvailabilityInteractor;
|
||||||
|
if-eqz v4, :invalid
|
||||||
|
invoke-interface {v4, v3}, Lcom/aspiro/wamp/model/AvailabilityInteractor;->getAvailability(Lcom/aspiro/wamp/model/MediaItem;)Lcom/aspiro/wamp/model/Availability$MediaItem;
|
||||||
|
move-result-object v4
|
||||||
|
invoke-virtual {v4}, Lcom/aspiro/wamp/model/Availability$MediaItem;->isAvailable()Z
|
||||||
|
move-result v4
|
||||||
|
if-eqz v4, :invalid
|
||||||
|
|
||||||
|
return-object v2
|
||||||
|
|
||||||
|
:invalid
|
||||||
|
const/4 v0, 0x0
|
||||||
|
return-object v0
|
||||||
|
.end method
|
||||||
|
|
||||||
|
.method public static install(Lcom/aspiro/wamp/playlist/ui/items/PlaylistItemCollectionView;)V
|
||||||
|
.locals 1
|
||||||
|
|
||||||
|
if-eqz p0, :done
|
||||||
|
new-instance v0, Lradiant/swipe/PlaylistItemsResolver;
|
||||||
|
invoke-direct {v0, p0}, Lradiant/swipe/PlaylistItemsResolver;-><init>(Lcom/aspiro/wamp/playlist/ui/items/PlaylistItemCollectionView;)V
|
||||||
|
invoke-static {p0, v0}, Lradiant/SwipeToQueue;->install(Landroidx/recyclerview/widget/RecyclerView;Lradiant/swipe/QueueRowResolver;)V
|
||||||
|
|
||||||
|
:done
|
||||||
|
return-void
|
||||||
|
.end method
|
||||||
|
|
||||||
|
.method private playlistIndex(Lradiant/swipe/QueueRequest;)I
|
||||||
|
.locals 6
|
||||||
|
|
||||||
|
iget-object v0, p0, Lradiant/swipe/PlaylistItemsResolver;->recycler: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/playlist/ui/items/PlaylistItemCollectionView;
|
||||||
|
if-eqz v0, :invalid
|
||||||
|
|
||||||
|
invoke-virtual {v0}, Landroidx/recyclerview/widget/RecyclerView;->getAdapter()Landroidx/recyclerview/widget/RecyclerView$Adapter;
|
||||||
|
move-result-object v0
|
||||||
|
instance-of v1, v0, La50/b;
|
||||||
|
if-eqz v1, :invalid
|
||||||
|
check-cast v0, La50/b;
|
||||||
|
iget-object v0, v0, La50/b;->b:Ljava/util/ArrayList;
|
||||||
|
|
||||||
|
iget v1, p1, Lradiant/swipe/QueueRequest;->position:I
|
||||||
|
const/4 v2, 0x0
|
||||||
|
const/4 v3, 0x0
|
||||||
|
|
||||||
|
:loop
|
||||||
|
if-ge v2, v1, :done
|
||||||
|
invoke-virtual {v0, v2}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
||||||
|
move-result-object v4
|
||||||
|
instance-of v5, v4, Lcom/aspiro/wamp/playlist/viewmodel/item/PlaylistItemViewModel;
|
||||||
|
if-eqz v5, :next
|
||||||
|
add-int/lit8 v3, v3, 0x1
|
||||||
|
|
||||||
|
:next
|
||||||
|
add-int/lit8 v2, v2, 0x1
|
||||||
|
goto :loop
|
||||||
|
|
||||||
|
:done
|
||||||
|
return v3
|
||||||
|
|
||||||
|
:invalid
|
||||||
|
const/4 v0, -0x1
|
||||||
|
return v0
|
||||||
|
.end method
|
||||||
|
|
||||||
|
.method private static track(Ljava/lang/Object;)Lcom/aspiro/wamp/model/Track;
|
||||||
|
.locals 1
|
||||||
|
|
||||||
|
instance-of v0, p0, Lcom/aspiro/wamp/playlist/viewmodel/item/TrackViewModel;
|
||||||
|
if-eqz v0, :podcast
|
||||||
|
check-cast p0, Lcom/aspiro/wamp/playlist/viewmodel/item/TrackViewModel;
|
||||||
|
invoke-virtual {p0}, Lcom/aspiro/wamp/playlist/viewmodel/item/TrackViewModel;->getTrack()Lcom/aspiro/wamp/model/Track;
|
||||||
|
move-result-object p0
|
||||||
|
return-object p0
|
||||||
|
|
||||||
|
:podcast
|
||||||
|
instance-of v0, p0, Lcom/aspiro/wamp/playlist/viewmodel/item/PodcastTrackViewModel;
|
||||||
|
if-eqz v0, :suggestion
|
||||||
|
check-cast p0, Lcom/aspiro/wamp/playlist/viewmodel/item/PodcastTrackViewModel;
|
||||||
|
invoke-virtual {p0}, Lcom/aspiro/wamp/playlist/viewmodel/item/PodcastTrackViewModel;->getItem()Lcom/aspiro/wamp/model/MediaItemParent;
|
||||||
|
move-result-object p0
|
||||||
|
invoke-virtual {p0}, Lcom/aspiro/wamp/model/MediaItemParent;->getMediaItem()Lcom/aspiro/wamp/model/MediaItem;
|
||||||
|
move-result-object p0
|
||||||
|
instance-of v0, p0, Lcom/aspiro/wamp/model/Track;
|
||||||
|
if-eqz v0, :invalid
|
||||||
|
check-cast p0, Lcom/aspiro/wamp/model/Track;
|
||||||
|
return-object p0
|
||||||
|
|
||||||
|
:suggestion
|
||||||
|
instance-of v0, p0, Lcom/aspiro/wamp/playlist/viewmodel/item/SuggestedTrackViewModel;
|
||||||
|
if-eqz v0, :invalid
|
||||||
|
check-cast p0, Lcom/aspiro/wamp/playlist/viewmodel/item/SuggestedTrackViewModel;
|
||||||
|
invoke-virtual {p0}, Lcom/aspiro/wamp/playlist/viewmodel/item/SuggestedTrackViewModel;->getTrack()Lcom/aspiro/wamp/model/Track;
|
||||||
|
move-result-object p0
|
||||||
|
return-object p0
|
||||||
|
|
||||||
|
:invalid
|
||||||
|
const/4 p0, 0x0
|
||||||
|
return-object p0
|
||||||
|
.end method
|
||||||
|
|
||||||
|
# virtual methods
|
||||||
|
.method public execute(Lradiant/swipe/QueueRequest;)V
|
||||||
|
.locals 8
|
||||||
|
|
||||||
|
invoke-direct {p0, p1}, Lradiant/swipe/PlaylistItemsResolver;->current(Lradiant/swipe/QueueRequest;)Ljava/lang/Object;
|
||||||
|
move-result-object v0
|
||||||
|
if-eqz v0, :done
|
||||||
|
invoke-static {v0}, Lradiant/swipe/PlaylistItemsResolver;->track(Ljava/lang/Object;)Lcom/aspiro/wamp/model/Track;
|
||||||
|
move-result-object v1
|
||||||
|
if-eqz v1, :done
|
||||||
|
|
||||||
|
iget-object v2, p0, Lradiant/swipe/PlaylistItemsResolver;->recycler: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/playlist/ui/items/PlaylistItemCollectionView;
|
||||||
|
if-eqz v2, :done
|
||||||
|
|
||||||
|
invoke-static {}, Lradiant/swipe/QueueExecutor;->hasActiveQueue()Z
|
||||||
|
move-result v3
|
||||||
|
if-eqz v3, :play
|
||||||
|
|
||||||
|
instance-of v3, v0, Lcom/aspiro/wamp/playlist/viewmodel/item/SuggestedTrackViewModel;
|
||||||
|
if-eqz v3, :append_member
|
||||||
|
|
||||||
|
invoke-virtual {v1}, Lcom/aspiro/wamp/model/MediaItem;->getId()I
|
||||||
|
move-result v3
|
||||||
|
invoke-static {v3}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
||||||
|
move-result-object v3
|
||||||
|
sget v4, Lcom/aspiro/wamp/R$string;->recommended_tracks:I
|
||||||
|
invoke-static {v4}, Lcom/aspiro/wamp/util/h0;->c(I)Ljava/lang/String;
|
||||||
|
move-result-object v4
|
||||||
|
iget-object v5, v2, Lcom/aspiro/wamp/playlist/ui/items/PlaylistItemCollectionView;->h:Lcom/tidal/android/navigation/NavigationInfo;
|
||||||
|
sget-object v6, Lcom/aspiro/wamp/playqueue/source/model/ItemSource$NavigationType$None;->INSTANCE:Lcom/aspiro/wamp/playqueue/source/model/ItemSource$NavigationType$None;
|
||||||
|
invoke-static {v3, v4, v5, v6}, 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 v7
|
||||||
|
invoke-virtual {v7, v1}, Lcom/aspiro/wamp/playqueue/source/model/Source;->addSourceItem(Lcom/aspiro/wamp/model/MediaItem;)V
|
||||||
|
sget-object v6, Lcom/aspiro/wamp/playlist/ui/items/ModuleMetadata$Suggestions;->INSTANCE:Lcom/aspiro/wamp/playlist/ui/items/ModuleMetadata$Suggestions;
|
||||||
|
goto :append
|
||||||
|
|
||||||
|
:append_member
|
||||||
|
iget-object v3, v2, Lcom/aspiro/wamp/playlist/ui/items/PlaylistItemCollectionView;->c:Lcom/aspiro/wamp/playlist/ui/items/a;
|
||||||
|
if-eqz v3, :done
|
||||||
|
invoke-interface {v3}, Lcom/aspiro/wamp/playlist/ui/items/a;->k()Lcom/aspiro/wamp/playlist/viewmodel/PlaylistCollectionViewModel;
|
||||||
|
move-result-object v3
|
||||||
|
invoke-virtual {v3}, Lcom/aspiro/wamp/playlist/viewmodel/PlaylistCollectionViewModel;->getPlaylist()Lcom/aspiro/wamp/model/Playlist;
|
||||||
|
move-result-object v3
|
||||||
|
if-eqz v3, :done
|
||||||
|
iget-object v4, v2, Lcom/aspiro/wamp/playlist/ui/items/PlaylistItemCollectionView;->h:Lcom/tidal/android/navigation/NavigationInfo;
|
||||||
|
if-eqz v4, :member_nav_ready
|
||||||
|
invoke-static {v4}, Lcom/tidal/android/navigation/a;->b(Lcom/tidal/android/navigation/NavigationInfo;)Lcom/tidal/android/navigation/NavigationInfo$Node;
|
||||||
|
move-result-object v4
|
||||||
|
:member_nav_ready
|
||||||
|
invoke-static {v3, v4}, Lcom/aspiro/wamp/playqueue/source/model/b;->f(Lcom/aspiro/wamp/model/Playlist;Lcom/tidal/android/navigation/NavigationInfo;)Lcom/aspiro/wamp/playqueue/source/model/PlaylistSource;
|
||||||
|
move-result-object v7
|
||||||
|
invoke-virtual {v7, v1}, Lcom/aspiro/wamp/playqueue/source/model/Source;->addSourceItem(Lcom/aspiro/wamp/model/MediaItem;)V
|
||||||
|
sget-object v6, Lcom/aspiro/wamp/playlist/ui/items/ModuleMetadata$Items;->INSTANCE:Lcom/aspiro/wamp/playlist/ui/items/ModuleMetadata$Items;
|
||||||
|
|
||||||
|
:append
|
||||||
|
invoke-virtual {v2}, Landroid/view/View;->getContext()Landroid/content/Context;
|
||||||
|
move-result-object v3
|
||||||
|
invoke-static {v3, v1, v6, v7}, 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
|
||||||
|
goto :done
|
||||||
|
|
||||||
|
:play
|
||||||
|
iget-object v3, v2, Lcom/aspiro/wamp/playlist/ui/items/PlaylistItemCollectionView;->c:Lcom/aspiro/wamp/playlist/ui/items/a;
|
||||||
|
if-eqz v3, :done
|
||||||
|
instance-of v0, v0, Lcom/aspiro/wamp/playlist/viewmodel/item/SuggestedTrackViewModel;
|
||||||
|
if-eqz v0, :play_member
|
||||||
|
invoke-interface {v3, v1}, Lcom/aspiro/wamp/playlist/ui/items/a;->c(Lcom/aspiro/wamp/model/Track;)V
|
||||||
|
goto :done
|
||||||
|
|
||||||
|
:play_member
|
||||||
|
invoke-direct {p0, p1}, Lradiant/swipe/PlaylistItemsResolver;->playlistIndex(Lradiant/swipe/QueueRequest;)I
|
||||||
|
move-result v0
|
||||||
|
if-gez v0, :start_member
|
||||||
|
goto :done
|
||||||
|
:start_member
|
||||||
|
invoke-interface {v3, v0}, Lcom/aspiro/wamp/playlist/ui/items/a;->i(I)V
|
||||||
|
|
||||||
|
:done
|
||||||
|
return-void
|
||||||
|
.end method
|
||||||
|
|
||||||
|
.method public resolve(Landroidx/recyclerview/widget/RecyclerView;Landroidx/recyclerview/widget/RecyclerView$ViewHolder;)Lradiant/swipe/QueueRequest;
|
||||||
|
.locals 5
|
||||||
|
|
||||||
|
iget-object v0, p0, Lradiant/swipe/PlaylistItemsResolver;->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 v0
|
||||||
|
const/4 v1, -0x1
|
||||||
|
if-ne v0, v1, :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 v1, p1, La50/b;
|
||||||
|
if-eqz v1, :invalid
|
||||||
|
check-cast p1, La50/b;
|
||||||
|
iget-object p1, p1, La50/b;->b:Ljava/util/ArrayList;
|
||||||
|
invoke-virtual {p1}, Ljava/util/ArrayList;->size()I
|
||||||
|
move-result v1
|
||||||
|
if-lt v0, v1, :read_item
|
||||||
|
goto :invalid
|
||||||
|
|
||||||
|
:read_item
|
||||||
|
invoke-virtual {p1, v0}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
||||||
|
move-result-object p1
|
||||||
|
|
||||||
|
instance-of v1, p2, Lij/q$a;
|
||||||
|
if-eqz v1, :podcast_holder
|
||||||
|
instance-of v1, p1, Lcom/aspiro/wamp/playlist/viewmodel/item/TrackViewModel;
|
||||||
|
if-eqz v1, :invalid
|
||||||
|
goto :create
|
||||||
|
|
||||||
|
:podcast_holder
|
||||||
|
instance-of v1, p2, Lij/a0$a;
|
||||||
|
if-eqz v1, :suggestion_holder
|
||||||
|
instance-of v1, p1, Lcom/aspiro/wamp/playlist/viewmodel/item/PodcastTrackViewModel;
|
||||||
|
if-eqz v1, :invalid
|
||||||
|
goto :create
|
||||||
|
|
||||||
|
:suggestion_holder
|
||||||
|
instance-of p2, p2, Lij/j0$a;
|
||||||
|
if-eqz p2, :invalid
|
||||||
|
instance-of p2, p1, Lcom/aspiro/wamp/playlist/viewmodel/item/SuggestedTrackViewModel;
|
||||||
|
if-eqz p2, :invalid
|
||||||
|
|
||||||
|
:create
|
||||||
|
invoke-static {p1}, Lradiant/swipe/PlaylistItemsResolver;->track(Ljava/lang/Object;)Lcom/aspiro/wamp/model/Track;
|
||||||
|
move-result-object p2
|
||||||
|
if-eqz p2, :invalid
|
||||||
|
invoke-virtual {p2}, Lcom/aspiro/wamp/model/MediaItem;->getId()I
|
||||||
|
move-result v1
|
||||||
|
new-instance v2, Lradiant/swipe/QueueRequest;
|
||||||
|
invoke-direct {v2, v0, p1, v1}, Lradiant/swipe/QueueRequest;-><init>(ILjava/lang/Object;I)V
|
||||||
|
invoke-direct {p0, v2}, Lradiant/swipe/PlaylistItemsResolver;->current(Lradiant/swipe/QueueRequest;)Ljava/lang/Object;
|
||||||
|
move-result-object p1
|
||||||
|
if-eqz p1, :invalid
|
||||||
|
return-object v2
|
||||||
|
|
||||||
|
:invalid
|
||||||
|
const/4 p1, 0x0
|
||||||
|
return-object p1
|
||||||
|
.end method
|
||||||
@@ -0,0 +1,248 @@
|
|||||||
|
.class public final Lradiant/swipe/SearchAlbumsResolver;
|
||||||
|
.super Ljava/lang/Object;
|
||||||
|
.source "SearchAlbumsResolver.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/search/SearchAlbumsView;)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/SearchAlbumsResolver;->fragment:Ljava/lang/ref/WeakReference;
|
||||||
|
|
||||||
|
return-void
|
||||||
|
.end method
|
||||||
|
|
||||||
|
.method private current(Lradiant/swipe/QueueRequest;)Lzc/a;
|
||||||
|
.locals 5
|
||||||
|
|
||||||
|
if-eqz p1, :invalid
|
||||||
|
|
||||||
|
iget-object v0, p0, Lradiant/swipe/SearchAlbumsResolver;->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/search/SearchAlbumsView;
|
||||||
|
|
||||||
|
if-eqz v0, :invalid
|
||||||
|
|
||||||
|
iget-object v1, v0, Lcom/aspiro/wamp/mycollection/subpages/albums/search/SearchAlbumsView;->f:Lid/e;
|
||||||
|
|
||||||
|
if-eqz v1, :invalid
|
||||||
|
|
||||||
|
invoke-virtual {v0}, Lcom/aspiro/wamp/mycollection/subpages/albums/search/SearchAlbumsView;->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/search/SearchAlbumsView;Landroidx/recyclerview/widget/RecyclerView;)V
|
||||||
|
.locals 1
|
||||||
|
|
||||||
|
if-eqz p0, :done
|
||||||
|
|
||||||
|
if-eqz p1, :done
|
||||||
|
|
||||||
|
new-instance v0, Lradiant/swipe/SearchAlbumsResolver;
|
||||||
|
|
||||||
|
invoke-direct {v0, p0}, Lradiant/swipe/SearchAlbumsResolver;-><init>(Lcom/aspiro/wamp/mycollection/subpages/albums/search/SearchAlbumsView;)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/SearchAlbumsResolver;->current(Lradiant/swipe/QueueRequest;)Lzc/a;
|
||||||
|
|
||||||
|
move-result-object p1
|
||||||
|
|
||||||
|
if-eqz p1, :done
|
||||||
|
|
||||||
|
iget-object v0, p0, Lradiant/swipe/SearchAlbumsResolver;->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/search/SearchAlbumsView;
|
||||||
|
|
||||||
|
if-eqz v0, :done
|
||||||
|
|
||||||
|
iget-object v1, v0, Lcom/aspiro/wamp/mycollection/subpages/albums/search/SearchAlbumsView;->c:Lld/c;
|
||||||
|
|
||||||
|
if-eqz v1, :done
|
||||||
|
|
||||||
|
iget-object v2, v1, Lld/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, Lld/c;->d:Lcom/aspiro/wamp/eventtracking/model/ContextualMetadata;
|
||||||
|
|
||||||
|
iget-object v6, v1, Lld/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/search/SearchAlbumsView;->g: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 resolve(Landroidx/recyclerview/widget/RecyclerView;Landroidx/recyclerview/widget/RecyclerView$ViewHolder;)Lradiant/swipe/QueueRequest;
|
||||||
|
.locals 5
|
||||||
|
|
||||||
|
instance-of v0, p2, Ljd/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,296 @@
|
|||||||
|
.class public final Lradiant/swipe/SearchPlaylistsResolver;
|
||||||
|
.super Ljava/lang/Object;
|
||||||
|
.source "SearchPlaylistsResolver.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/playlists/searchplaylists/SearchPlaylistsView;)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/SearchPlaylistsResolver;->fragment:Ljava/lang/ref/WeakReference;
|
||||||
|
|
||||||
|
return-void
|
||||||
|
.end method
|
||||||
|
|
||||||
|
.method private current(Lradiant/swipe/QueueRequest;)Lcf/b;
|
||||||
|
.locals 6
|
||||||
|
|
||||||
|
if-eqz p1, :invalid
|
||||||
|
|
||||||
|
iget-object v0, p1, Lradiant/swipe/QueueRequest;->media:Ljava/lang/Object;
|
||||||
|
|
||||||
|
instance-of v1, v0, Lcom/aspiro/wamp/model/Playlist;
|
||||||
|
|
||||||
|
if-eqz v1, :invalid
|
||||||
|
|
||||||
|
check-cast v0, Lcom/aspiro/wamp/model/Playlist;
|
||||||
|
|
||||||
|
iget-object v1, p0, Lradiant/swipe/SearchPlaylistsResolver;->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/playlists/searchplaylists/SearchPlaylistsView;
|
||||||
|
|
||||||
|
if-eqz v1, :invalid
|
||||||
|
|
||||||
|
iget-object v2, v1, Lcom/aspiro/wamp/mycollection/subpages/playlists/searchplaylists/SearchPlaylistsView;->g:Lwf/d;
|
||||||
|
|
||||||
|
if-eqz v2, :invalid
|
||||||
|
|
||||||
|
invoke-virtual {v1}, Lcom/aspiro/wamp/mycollection/subpages/playlists/searchplaylists/SearchPlaylistsView;->N()La50/d;
|
||||||
|
|
||||||
|
move-result-object v1
|
||||||
|
|
||||||
|
invoke-virtual {v1}, Landroidx/recyclerview/widget/ListAdapter;->getCurrentList()Ljava/util/List;
|
||||||
|
|
||||||
|
move-result-object v1
|
||||||
|
|
||||||
|
iget v2, p1, Lradiant/swipe/QueueRequest;->position:I
|
||||||
|
|
||||||
|
if-gez v2, :check_size
|
||||||
|
|
||||||
|
goto :invalid
|
||||||
|
|
||||||
|
:check_size
|
||||||
|
invoke-interface {v1}, Ljava/util/List;->size()I
|
||||||
|
|
||||||
|
move-result v3
|
||||||
|
|
||||||
|
if-lt v2, v3, :read_item
|
||||||
|
|
||||||
|
goto :invalid
|
||||||
|
|
||||||
|
:read_item
|
||||||
|
invoke-interface {v1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
||||||
|
|
||||||
|
move-result-object v1
|
||||||
|
|
||||||
|
instance-of v2, v1, Lcf/b;
|
||||||
|
|
||||||
|
if-eqz v2, :invalid
|
||||||
|
|
||||||
|
check-cast v1, Lcf/b;
|
||||||
|
|
||||||
|
iget-boolean v2, v1, Lcf/b;->h:Z
|
||||||
|
|
||||||
|
if-eqz v2, :invalid
|
||||||
|
|
||||||
|
iget-boolean v2, v1, Lcf/b;->f:Z
|
||||||
|
|
||||||
|
if-eqz v2, :check_playlist
|
||||||
|
|
||||||
|
const-string v2, "NOT_READY"
|
||||||
|
|
||||||
|
iget-object v3, v1, Lcf/b;->g:Ljava/lang/String;
|
||||||
|
|
||||||
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
||||||
|
|
||||||
|
move-result v2
|
||||||
|
|
||||||
|
if-nez v2, :invalid
|
||||||
|
|
||||||
|
:check_playlist
|
||||||
|
iget-object v2, v1, Lcf/b;->a:Lcom/aspiro/wamp/model/Playlist;
|
||||||
|
|
||||||
|
invoke-virtual {v2}, Lcom/aspiro/wamp/model/Playlist;->getNumberOfItems()I
|
||||||
|
|
||||||
|
move-result v3
|
||||||
|
|
||||||
|
if-lez v3, :invalid
|
||||||
|
|
||||||
|
invoke-virtual {v2}, Lcom/aspiro/wamp/model/Playlist;->getUuid()Ljava/lang/String;
|
||||||
|
|
||||||
|
move-result-object v2
|
||||||
|
|
||||||
|
invoke-virtual {v0}, Lcom/aspiro/wamp/model/Playlist;->getUuid()Ljava/lang/String;
|
||||||
|
|
||||||
|
move-result-object v0
|
||||||
|
|
||||||
|
invoke-virtual {v2, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
||||||
|
|
||||||
|
move-result v0
|
||||||
|
|
||||||
|
if-eqz v0, :invalid
|
||||||
|
|
||||||
|
return-object v1
|
||||||
|
|
||||||
|
:invalid
|
||||||
|
const/4 v0, 0x0
|
||||||
|
|
||||||
|
return-object v0
|
||||||
|
.end method
|
||||||
|
|
||||||
|
.method public static install(Lcom/aspiro/wamp/mycollection/subpages/playlists/searchplaylists/SearchPlaylistsView;Landroidx/recyclerview/widget/RecyclerView;)V
|
||||||
|
.locals 1
|
||||||
|
|
||||||
|
if-eqz p0, :done
|
||||||
|
|
||||||
|
if-eqz p1, :done
|
||||||
|
|
||||||
|
new-instance v0, Lradiant/swipe/SearchPlaylistsResolver;
|
||||||
|
|
||||||
|
invoke-direct {v0, p0}, Lradiant/swipe/SearchPlaylistsResolver;-><init>(Lcom/aspiro/wamp/mycollection/subpages/playlists/searchplaylists/SearchPlaylistsView;)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 6
|
||||||
|
|
||||||
|
invoke-direct {p0, p1}, Lradiant/swipe/SearchPlaylistsResolver;->current(Lradiant/swipe/QueueRequest;)Lcf/b;
|
||||||
|
|
||||||
|
move-result-object p1
|
||||||
|
|
||||||
|
if-eqz p1, :done
|
||||||
|
|
||||||
|
iget-object v0, p0, Lradiant/swipe/SearchPlaylistsResolver;->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/playlists/searchplaylists/SearchPlaylistsView;
|
||||||
|
|
||||||
|
if-eqz v0, :done
|
||||||
|
|
||||||
|
iget-object v1, v0, Lcom/aspiro/wamp/mycollection/subpages/playlists/searchplaylists/SearchPlaylistsView;->c:Lzf/c;
|
||||||
|
|
||||||
|
if-eqz v1, :done
|
||||||
|
|
||||||
|
invoke-virtual {v0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
||||||
|
|
||||||
|
move-result-object v2
|
||||||
|
|
||||||
|
iget-object v3, p1, Lcf/b;->a:Lcom/aspiro/wamp/model/Playlist;
|
||||||
|
|
||||||
|
new-instance v4, Lcom/aspiro/wamp/eventtracking/model/ContextualMetadata;
|
||||||
|
|
||||||
|
const-string v5, "mycollection_search_playlists"
|
||||||
|
|
||||||
|
invoke-direct {v4, v5}, Lcom/aspiro/wamp/eventtracking/model/ContextualMetadata;-><init>(Ljava/lang/String;)V
|
||||||
|
|
||||||
|
iget-object v5, v1, Lzf/c;->c:Lcom/tidal/android/navigation/NavigationInfo;
|
||||||
|
|
||||||
|
invoke-static {v2, v3, v4, v5}, Lradiant/swipe/QueueExecutor;->playlist(Landroid/content/Context;Lcom/aspiro/wamp/model/Playlist;Lcom/aspiro/wamp/eventtracking/model/ContextualMetadata;Lcom/tidal/android/navigation/NavigationInfo;)V
|
||||||
|
|
||||||
|
:done
|
||||||
|
return-void
|
||||||
|
.end method
|
||||||
|
|
||||||
|
.method public resolve(Landroidx/recyclerview/widget/RecyclerView;Landroidx/recyclerview/widget/RecyclerView$ViewHolder;)Lradiant/swipe/QueueRequest;
|
||||||
|
.locals 5
|
||||||
|
|
||||||
|
instance-of v0, p2, Lxf/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, Lcf/b;
|
||||||
|
|
||||||
|
if-eqz v0, :invalid
|
||||||
|
|
||||||
|
check-cast p1, Lcf/b;
|
||||||
|
|
||||||
|
iget-boolean v0, p1, Lcf/b;->h:Z
|
||||||
|
|
||||||
|
if-eqz v0, :invalid
|
||||||
|
|
||||||
|
iget-boolean v0, p1, Lcf/b;->f:Z
|
||||||
|
|
||||||
|
if-eqz v0, :check_playlist
|
||||||
|
|
||||||
|
const-string v0, "NOT_READY"
|
||||||
|
|
||||||
|
iget-object v1, p1, Lcf/b;->g:Ljava/lang/String;
|
||||||
|
|
||||||
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
||||||
|
|
||||||
|
move-result v0
|
||||||
|
|
||||||
|
if-nez v0, :invalid
|
||||||
|
|
||||||
|
:check_playlist
|
||||||
|
iget-object v0, p1, Lcf/b;->a:Lcom/aspiro/wamp/model/Playlist;
|
||||||
|
|
||||||
|
invoke-virtual {v0}, Lcom/aspiro/wamp/model/Playlist;->getNumberOfItems()I
|
||||||
|
|
||||||
|
move-result v1
|
||||||
|
|
||||||
|
if-lez v1, :invalid
|
||||||
|
|
||||||
|
invoke-virtual {v0}, Lcom/aspiro/wamp/model/Playlist;->getUuid()Ljava/lang/String;
|
||||||
|
|
||||||
|
move-result-object v1
|
||||||
|
|
||||||
|
invoke-virtual {v1}, Ljava/lang/String;->hashCode()I
|
||||||
|
|
||||||
|
move-result v2
|
||||||
|
|
||||||
|
new-instance v3, Lradiant/swipe/QueueRequest;
|
||||||
|
|
||||||
|
invoke-direct {v3, p2, v0, v2}, Lradiant/swipe/QueueRequest;-><init>(ILjava/lang/Object;I)V
|
||||||
|
|
||||||
|
return-object v3
|
||||||
|
|
||||||
|
:invalid
|
||||||
|
const/4 p1, 0x0
|
||||||
|
|
||||||
|
return-object p1
|
||||||
|
.end method
|
||||||
@@ -0,0 +1,416 @@
|
|||||||
|
.class public final Lradiant/swipe/UnifiedSearchResolver;
|
||||||
|
.super Ljava/lang/Object;
|
||||||
|
.source "UnifiedSearchResolver.smali"
|
||||||
|
|
||||||
|
# interfaces
|
||||||
|
.implements Lradiant/swipe/QueueRowResolver;
|
||||||
|
|
||||||
|
# instance fields
|
||||||
|
.field private final fragment:Ljava/lang/ref/WeakReference;
|
||||||
|
.field private final recycler:Ljava/lang/ref/WeakReference;
|
||||||
|
|
||||||
|
# direct methods
|
||||||
|
.method private constructor <init>(Lcom/aspiro/wamp/search/v2/UnifiedSearchView;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/UnifiedSearchResolver;->fragment:Ljava/lang/ref/WeakReference;
|
||||||
|
new-instance v0, Ljava/lang/ref/WeakReference;
|
||||||
|
invoke-direct {v0, p2}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V
|
||||||
|
iput-object v0, p0, Lradiant/swipe/UnifiedSearchResolver;->recycler:Ljava/lang/ref/WeakReference;
|
||||||
|
return-void
|
||||||
|
.end method
|
||||||
|
|
||||||
|
.method private current(Lradiant/swipe/QueueRequest;)Ljava/lang/Object;
|
||||||
|
.locals 7
|
||||||
|
|
||||||
|
if-eqz p1, :invalid
|
||||||
|
iget-object v0, p1, Lradiant/swipe/QueueRequest;->media:Ljava/lang/Object;
|
||||||
|
|
||||||
|
iget-object v1, p0, Lradiant/swipe/UnifiedSearchResolver;->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 v1
|
||||||
|
instance-of v2, v1, La50/d;
|
||||||
|
if-eqz v2, :invalid
|
||||||
|
check-cast v1, La50/d;
|
||||||
|
invoke-virtual {v1}, Landroidx/recyclerview/widget/ListAdapter;->getCurrentList()Ljava/util/List;
|
||||||
|
move-result-object v1
|
||||||
|
|
||||||
|
iget v2, p1, Lradiant/swipe/QueueRequest;->position:I
|
||||||
|
if-gez v2, :check_size
|
||||||
|
goto :invalid
|
||||||
|
:check_size
|
||||||
|
invoke-interface {v1}, Ljava/util/List;->size()I
|
||||||
|
move-result v3
|
||||||
|
if-lt v2, v3, :read_item
|
||||||
|
goto :invalid
|
||||||
|
:read_item
|
||||||
|
invoke-interface {v1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
||||||
|
move-result-object v1
|
||||||
|
|
||||||
|
instance-of v2, v0, Lbm/k;
|
||||||
|
if-eqz v2, :album
|
||||||
|
instance-of v2, v1, Lbm/k;
|
||||||
|
if-eqz v2, :invalid
|
||||||
|
move-object v2, v0
|
||||||
|
check-cast v2, Lbm/k;
|
||||||
|
move-object v3, v1
|
||||||
|
check-cast v3, Lbm/k;
|
||||||
|
iget-object v4, v3, Lbm/k;->e:Lcom/aspiro/wamp/model/Availability$MediaItem;
|
||||||
|
invoke-virtual {v4}, Lcom/aspiro/wamp/model/Availability$MediaItem;->isAvailable()Z
|
||||||
|
move-result v4
|
||||||
|
if-eqz v4, :invalid
|
||||||
|
iget-object v2, v2, Lbm/k;->a:Lcom/aspiro/wamp/model/Track;
|
||||||
|
iget-object v3, v3, Lbm/k;->a:Lcom/aspiro/wamp/model/Track;
|
||||||
|
invoke-virtual {v2}, Lcom/aspiro/wamp/model/MediaItem;->getId()I
|
||||||
|
move-result v2
|
||||||
|
invoke-virtual {v3}, Lcom/aspiro/wamp/model/MediaItem;->getId()I
|
||||||
|
move-result v3
|
||||||
|
if-ne v2, v3, :invalid
|
||||||
|
iget v4, p1, Lradiant/swipe/QueueRequest;->id:I
|
||||||
|
if-ne v3, v4, :invalid
|
||||||
|
return-object v1
|
||||||
|
|
||||||
|
:album
|
||||||
|
instance-of v2, v0, Lbm/a;
|
||||||
|
if-eqz v2, :playlist
|
||||||
|
instance-of v2, v1, Lbm/a;
|
||||||
|
if-eqz v2, :invalid
|
||||||
|
move-object v2, v0
|
||||||
|
check-cast v2, Lbm/a;
|
||||||
|
move-object v3, v1
|
||||||
|
check-cast v3, Lbm/a;
|
||||||
|
iget-object v4, v3, Lbm/a;->c:Lcom/aspiro/wamp/model/Availability$Album;
|
||||||
|
invoke-virtual {v4}, Lcom/aspiro/wamp/model/Availability$Album;->isAvailable()Z
|
||||||
|
move-result v4
|
||||||
|
if-eqz v4, :invalid
|
||||||
|
iget-object v2, v2, Lbm/a;->a:Lcom/aspiro/wamp/model/Album;
|
||||||
|
iget-object v3, v3, Lbm/a;->a:Lcom/aspiro/wamp/model/Album;
|
||||||
|
invoke-virtual {v2}, Lcom/aspiro/wamp/model/Album;->getId()I
|
||||||
|
move-result v2
|
||||||
|
invoke-virtual {v3}, Lcom/aspiro/wamp/model/Album;->getId()I
|
||||||
|
move-result v3
|
||||||
|
if-ne v2, v3, :invalid
|
||||||
|
iget v4, p1, Lradiant/swipe/QueueRequest;->id:I
|
||||||
|
if-ne v3, v4, :invalid
|
||||||
|
return-object v1
|
||||||
|
|
||||||
|
:playlist
|
||||||
|
instance-of v2, v0, Lbm/g;
|
||||||
|
if-eqz v2, :mix
|
||||||
|
instance-of v2, v1, Lbm/g;
|
||||||
|
if-eqz v2, :invalid
|
||||||
|
move-object v2, v0
|
||||||
|
check-cast v2, Lbm/g;
|
||||||
|
move-object v3, v1
|
||||||
|
check-cast v3, Lbm/g;
|
||||||
|
iget-object v2, v2, Lbm/g;->a:Lcom/aspiro/wamp/model/Playlist;
|
||||||
|
iget-object v3, v3, Lbm/g;->a:Lcom/aspiro/wamp/model/Playlist;
|
||||||
|
invoke-virtual {v3}, Lcom/aspiro/wamp/model/Playlist;->getNumberOfItems()I
|
||||||
|
move-result v4
|
||||||
|
if-lez v4, :invalid
|
||||||
|
const-string v4, "NOT_READY"
|
||||||
|
invoke-virtual {v3}, Lcom/aspiro/wamp/model/Playlist;->getStatus()Ljava/lang/String;
|
||||||
|
move-result-object v5
|
||||||
|
invoke-virtual {v4, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
||||||
|
move-result v4
|
||||||
|
if-nez v4, :invalid
|
||||||
|
invoke-virtual {v2}, Lcom/aspiro/wamp/model/Playlist;->getUuid()Ljava/lang/String;
|
||||||
|
move-result-object v2
|
||||||
|
invoke-virtual {v3}, Lcom/aspiro/wamp/model/Playlist;->getUuid()Ljava/lang/String;
|
||||||
|
move-result-object v3
|
||||||
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
||||||
|
move-result v2
|
||||||
|
if-eqz v2, :invalid
|
||||||
|
invoke-virtual {v3}, Ljava/lang/String;->hashCode()I
|
||||||
|
move-result v2
|
||||||
|
iget v4, p1, Lradiant/swipe/QueueRequest;->id:I
|
||||||
|
if-ne v2, v4, :invalid
|
||||||
|
|
||||||
|
iget-object v2, p0, Lradiant/swipe/UnifiedSearchResolver;->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/search/v2/UnifiedSearchView;
|
||||||
|
if-eqz v2, :invalid
|
||||||
|
invoke-virtual {v2}, Lcom/aspiro/wamp/search/v2/UnifiedSearchView;->N()Ltl/h;
|
||||||
|
move-result-object v2
|
||||||
|
instance-of v4, v2, Lcom/aspiro/wamp/search/v2/d;
|
||||||
|
if-eqz v4, :invalid
|
||||||
|
check-cast v2, Lcom/aspiro/wamp/search/v2/d;
|
||||||
|
iget-object v2, v2, Lcom/aspiro/wamp/search/v2/d;->e:Lcom/aspiro/wamp/model/AvailabilityInteractor;
|
||||||
|
invoke-static {v3}, Ljava/util/UUID;->fromString(Ljava/lang/String;)Ljava/util/UUID;
|
||||||
|
move-result-object v3
|
||||||
|
invoke-interface {v2, v3}, Lcom/aspiro/wamp/model/AvailabilityInteractor;->getPlaylistAvailability(Ljava/util/UUID;)Lcom/aspiro/wamp/model/Availability$Playlist;
|
||||||
|
move-result-object v2
|
||||||
|
invoke-virtual {v2}, Lcom/aspiro/wamp/model/Availability$Playlist;->isAvailable()Z
|
||||||
|
move-result v2
|
||||||
|
if-eqz v2, :invalid
|
||||||
|
return-object v1
|
||||||
|
|
||||||
|
:mix
|
||||||
|
instance-of v2, v0, Lbm/f;
|
||||||
|
if-eqz v2, :invalid
|
||||||
|
instance-of v2, v1, Lbm/f;
|
||||||
|
if-eqz v2, :invalid
|
||||||
|
move-object v2, v0
|
||||||
|
check-cast v2, Lbm/f;
|
||||||
|
move-object v3, v1
|
||||||
|
check-cast v3, Lbm/f;
|
||||||
|
iget-object v2, v2, Lbm/f;->a:Lcom/aspiro/wamp/mix/model/Mix;
|
||||||
|
iget-object v3, v3, Lbm/f;->a:Lcom/aspiro/wamp/mix/model/Mix;
|
||||||
|
invoke-virtual {v2}, Lcom/aspiro/wamp/mix/model/Mix;->getId()Ljava/lang/String;
|
||||||
|
move-result-object v2
|
||||||
|
invoke-virtual {v3}, Lcom/aspiro/wamp/mix/model/Mix;->getId()Ljava/lang/String;
|
||||||
|
move-result-object v3
|
||||||
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
||||||
|
move-result v2
|
||||||
|
if-eqz v2, :invalid
|
||||||
|
invoke-virtual {v3}, Ljava/lang/String;->hashCode()I
|
||||||
|
move-result v2
|
||||||
|
iget v4, p1, Lradiant/swipe/QueueRequest;->id:I
|
||||||
|
if-ne v2, v4, :invalid
|
||||||
|
|
||||||
|
iget-object v2, p0, Lradiant/swipe/UnifiedSearchResolver;->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/search/v2/UnifiedSearchView;
|
||||||
|
if-eqz v2, :invalid
|
||||||
|
invoke-virtual {v2}, Lcom/aspiro/wamp/search/v2/UnifiedSearchView;->N()Ltl/h;
|
||||||
|
move-result-object v2
|
||||||
|
instance-of v4, v2, Lcom/aspiro/wamp/search/v2/d;
|
||||||
|
if-eqz v4, :invalid
|
||||||
|
check-cast v2, Lcom/aspiro/wamp/search/v2/d;
|
||||||
|
iget-object v2, v2, Lcom/aspiro/wamp/search/v2/d;->e:Lcom/aspiro/wamp/model/AvailabilityInteractor;
|
||||||
|
invoke-interface {v2, v3}, Lcom/aspiro/wamp/model/AvailabilityInteractor;->getMixAvailability(Ljava/lang/String;)Lcom/aspiro/wamp/model/Availability$Mix;
|
||||||
|
move-result-object v2
|
||||||
|
invoke-virtual {v2}, Lcom/aspiro/wamp/model/Availability$Mix;->isAvailable()Z
|
||||||
|
move-result v2
|
||||||
|
if-eqz v2, :invalid
|
||||||
|
return-object v1
|
||||||
|
|
||||||
|
:invalid
|
||||||
|
const/4 v0, 0x0
|
||||||
|
return-object v0
|
||||||
|
.end method
|
||||||
|
|
||||||
|
.method public static install(Lcom/aspiro/wamp/search/v2/UnifiedSearchView;Landroidx/recyclerview/widget/RecyclerView;)V
|
||||||
|
.locals 1
|
||||||
|
if-eqz p0, :done
|
||||||
|
if-eqz p1, :done
|
||||||
|
new-instance v0, Lradiant/swipe/UnifiedSearchResolver;
|
||||||
|
invoke-direct {v0, p0, p1}, Lradiant/swipe/UnifiedSearchResolver;-><init>(Lcom/aspiro/wamp/search/v2/UnifiedSearchView;Landroidx/recyclerview/widget/RecyclerView;)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 8
|
||||||
|
|
||||||
|
invoke-direct {p0, p1}, Lradiant/swipe/UnifiedSearchResolver;->current(Lradiant/swipe/QueueRequest;)Ljava/lang/Object;
|
||||||
|
move-result-object v0
|
||||||
|
if-eqz v0, :done
|
||||||
|
|
||||||
|
iget-object v1, p0, Lradiant/swipe/UnifiedSearchResolver;->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/search/v2/UnifiedSearchView;
|
||||||
|
if-eqz v1, :done
|
||||||
|
iget-object v2, v1, Lcom/aspiro/wamp/search/v2/UnifiedSearchView;->c:Ltl/q;
|
||||||
|
if-eqz v2, :done
|
||||||
|
|
||||||
|
invoke-static {v0}, Lbm/i;->a(Lbm/h;)Lcom/aspiro/wamp/eventtracking/model/ContextualMetadata;
|
||||||
|
move-result-object v3
|
||||||
|
iget-object v4, v2, Ltl/q;->c:Lcom/tidal/android/navigation/NavigationInfo;
|
||||||
|
|
||||||
|
instance-of v5, v0, Lbm/k;
|
||||||
|
if-eqz v5, :album
|
||||||
|
move-object v5, v0
|
||||||
|
check-cast v5, Lbm/k;
|
||||||
|
iget-object v6, v5, Lbm/k;->a:Lcom/aspiro/wamp/model/Track;
|
||||||
|
invoke-static {}, Lradiant/swipe/QueueExecutor;->hasActiveQueue()Z
|
||||||
|
move-result v7
|
||||||
|
if-nez v7, :append_track
|
||||||
|
new-instance v2, Lcom/aspiro/wamp/search/v2/a$g;
|
||||||
|
iget v3, p1, Lradiant/swipe/QueueRequest;->position:I
|
||||||
|
invoke-direct {v2, v0, v3}, Lcom/aspiro/wamp/search/v2/a$g;-><init>(Lbm/h;I)V
|
||||||
|
invoke-virtual {v1}, Lcom/aspiro/wamp/search/v2/UnifiedSearchView;->N()Ltl/h;
|
||||||
|
move-result-object v0
|
||||||
|
invoke-interface {v0, v2}, Ltl/f;->e(Lcom/aspiro/wamp/search/v2/a;)V
|
||||||
|
goto :done
|
||||||
|
|
||||||
|
:append_track
|
||||||
|
const-string v7, ""
|
||||||
|
iget-object p1, v5, Lbm/k;->n:Lcom/aspiro/wamp/search/SearchDataSource;
|
||||||
|
sget-object v0, Lcom/aspiro/wamp/search/SearchDataSource;->REMOTE:Lcom/aspiro/wamp/search/SearchDataSource;
|
||||||
|
if-ne p1, v0, :query_ready
|
||||||
|
invoke-virtual {v1}, Lcom/aspiro/wamp/search/v2/UnifiedSearchView;->N()Ltl/h;
|
||||||
|
move-result-object p1
|
||||||
|
invoke-interface {p1}, Ltl/h;->c()Lcom/aspiro/wamp/search/v2/model/UnifiedSearchQuery;
|
||||||
|
move-result-object p1
|
||||||
|
iget-object v7, p1, Lcom/aspiro/wamp/search/v2/model/UnifiedSearchQuery;->a:Ljava/lang/String;
|
||||||
|
:query_ready
|
||||||
|
invoke-virtual {v6}, Lcom/aspiro/wamp/model/MediaItem;->getId()I
|
||||||
|
move-result p1
|
||||||
|
invoke-static {p1}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
||||||
|
move-result-object p1
|
||||||
|
const/4 v0, 0x0
|
||||||
|
if-eqz v4, :nav_ready
|
||||||
|
invoke-static {v4}, Lcom/tidal/android/navigation/a;->b(Lcom/tidal/android/navigation/NavigationInfo;)Lcom/tidal/android/navigation/NavigationInfo$Node;
|
||||||
|
move-result-object v0
|
||||||
|
:nav_ready
|
||||||
|
invoke-static {p1, v7, v0}, Lcom/aspiro/wamp/playqueue/source/model/b;->o(Ljava/lang/String;Ljava/lang/String;Lcom/tidal/android/navigation/NavigationInfo;)Lcom/aspiro/wamp/playqueue/source/model/ItemSource;
|
||||||
|
move-result-object p1
|
||||||
|
invoke-virtual {p1, v6}, Lcom/aspiro/wamp/playqueue/source/model/Source;->addSourceItem(Lcom/aspiro/wamp/model/MediaItem;)V
|
||||||
|
invoke-virtual {v1}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
||||||
|
move-result-object v0
|
||||||
|
invoke-static {v0, v6, v3, p1}, 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
|
||||||
|
goto :done
|
||||||
|
|
||||||
|
:album
|
||||||
|
instance-of v5, v0, Lbm/a;
|
||||||
|
if-eqz v5, :playlist
|
||||||
|
iget-object v5, v2, Ltl/q;->a:Lx40/a;
|
||||||
|
instance-of v6, v5, Lh4/a;
|
||||||
|
if-eqz v6, :done
|
||||||
|
check-cast v5, Lh4/a;
|
||||||
|
check-cast v0, Lbm/a;
|
||||||
|
iget-object v6, v0, Lbm/a;->a:Lcom/aspiro/wamp/model/Album;
|
||||||
|
invoke-virtual {v1}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
||||||
|
move-result-object v7
|
||||||
|
invoke-static {v7, v6, v3, v4, v5}, 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 v0
|
||||||
|
if-eqz v0, :done
|
||||||
|
iget-object v1, v1, Lcom/aspiro/wamp/search/v2/UnifiedSearchView;->g:Lio/reactivex/disposables/CompositeDisposable;
|
||||||
|
invoke-virtual {v1, v0}, Lio/reactivex/disposables/CompositeDisposable;->add(Lio/reactivex/disposables/Disposable;)Z
|
||||||
|
goto :done
|
||||||
|
|
||||||
|
:playlist
|
||||||
|
instance-of v5, v0, Lbm/g;
|
||||||
|
if-eqz v5, :mix
|
||||||
|
check-cast v0, Lbm/g;
|
||||||
|
iget-object v5, v0, Lbm/g;->a:Lcom/aspiro/wamp/model/Playlist;
|
||||||
|
invoke-virtual {v1}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
||||||
|
move-result-object v6
|
||||||
|
invoke-static {v6, v5, v3, v4}, Lradiant/swipe/QueueExecutor;->playlist(Landroid/content/Context;Lcom/aspiro/wamp/model/Playlist;Lcom/aspiro/wamp/eventtracking/model/ContextualMetadata;Lcom/tidal/android/navigation/NavigationInfo;)V
|
||||||
|
goto :done
|
||||||
|
|
||||||
|
:mix
|
||||||
|
instance-of v5, v0, Lbm/f;
|
||||||
|
if-eqz v5, :done
|
||||||
|
iget-object v5, v2, Ltl/q;->a:Lx40/a;
|
||||||
|
instance-of v6, v5, Lh4/a;
|
||||||
|
if-eqz v6, :done
|
||||||
|
check-cast v5, Lh4/a;
|
||||||
|
check-cast v0, Lbm/f;
|
||||||
|
iget-object v6, v0, Lbm/f;->a:Lcom/aspiro/wamp/mix/model/Mix;
|
||||||
|
invoke-virtual {v1}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
||||||
|
move-result-object v7
|
||||||
|
invoke-static {v7, v6, v3, v4, v5}, Lradiant/swipe/QueueExecutor;->mix(Landroid/content/Context;Lcom/aspiro/wamp/mix/model/Mix;Lcom/aspiro/wamp/eventtracking/model/ContextualMetadata;Lcom/tidal/android/navigation/NavigationInfo;Lh4/a;)Lio/reactivex/disposables/Disposable;
|
||||||
|
move-result-object v0
|
||||||
|
if-eqz v0, :done
|
||||||
|
iget-object v1, v1, Lcom/aspiro/wamp/search/v2/UnifiedSearchView;->g:Lio/reactivex/disposables/CompositeDisposable;
|
||||||
|
invoke-virtual {v1, v0}, Lio/reactivex/disposables/CompositeDisposable;->add(Lio/reactivex/disposables/Disposable;)Z
|
||||||
|
|
||||||
|
:done
|
||||||
|
return-void
|
||||||
|
.end method
|
||||||
|
|
||||||
|
.method public resolve(Landroidx/recyclerview/widget/RecyclerView;Landroidx/recyclerview/widget/RecyclerView$ViewHolder;)Lradiant/swipe/QueueRequest;
|
||||||
|
.locals 6
|
||||||
|
|
||||||
|
iget-object v0, p0, Lradiant/swipe/UnifiedSearchResolver;->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 v0
|
||||||
|
const/4 v1, -0x1
|
||||||
|
if-ne v0, v1, :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 v1, p1, La50/d;
|
||||||
|
if-eqz v1, :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 v1
|
||||||
|
if-lt v0, v1, :read_item
|
||||||
|
goto :invalid
|
||||||
|
:read_item
|
||||||
|
invoke-interface {p1, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
||||||
|
move-result-object p1
|
||||||
|
|
||||||
|
instance-of v1, p2, Lul/n0$a;
|
||||||
|
if-eqz v1, :album_holder
|
||||||
|
instance-of v1, p1, Lbm/k;
|
||||||
|
if-eqz v1, :invalid
|
||||||
|
move-object v1, p1
|
||||||
|
check-cast v1, Lbm/k;
|
||||||
|
iget-object v1, v1, Lbm/k;->a:Lcom/aspiro/wamp/model/Track;
|
||||||
|
invoke-virtual {v1}, Lcom/aspiro/wamp/model/MediaItem;->getId()I
|
||||||
|
move-result v1
|
||||||
|
goto :create
|
||||||
|
|
||||||
|
:album_holder
|
||||||
|
instance-of v1, p2, Lul/d$a;
|
||||||
|
if-eqz v1, :playlist_holder
|
||||||
|
instance-of v1, p1, Lbm/a;
|
||||||
|
if-eqz v1, :invalid
|
||||||
|
move-object v1, p1
|
||||||
|
check-cast v1, Lbm/a;
|
||||||
|
iget-object v1, v1, Lbm/a;->a:Lcom/aspiro/wamp/model/Album;
|
||||||
|
invoke-virtual {v1}, Lcom/aspiro/wamp/model/Album;->getId()I
|
||||||
|
move-result v1
|
||||||
|
goto :create
|
||||||
|
|
||||||
|
:playlist_holder
|
||||||
|
instance-of v1, p2, Lul/a0$a;
|
||||||
|
if-eqz v1, :mix_holder
|
||||||
|
instance-of v1, p1, Lbm/g;
|
||||||
|
if-eqz v1, :invalid
|
||||||
|
move-object v1, p1
|
||||||
|
check-cast v1, Lbm/g;
|
||||||
|
iget-object v1, v1, Lbm/g;->a:Lcom/aspiro/wamp/model/Playlist;
|
||||||
|
invoke-virtual {v1}, Lcom/aspiro/wamp/model/Playlist;->getUuid()Ljava/lang/String;
|
||||||
|
move-result-object v1
|
||||||
|
invoke-virtual {v1}, Ljava/lang/String;->hashCode()I
|
||||||
|
move-result v1
|
||||||
|
goto :create
|
||||||
|
|
||||||
|
:mix_holder
|
||||||
|
instance-of p2, p2, Lul/w$a;
|
||||||
|
if-eqz p2, :invalid
|
||||||
|
instance-of p2, p1, Lbm/f;
|
||||||
|
if-eqz p2, :invalid
|
||||||
|
move-object p2, p1
|
||||||
|
check-cast p2, Lbm/f;
|
||||||
|
iget-object p2, p2, Lbm/f;->a:Lcom/aspiro/wamp/mix/model/Mix;
|
||||||
|
invoke-virtual {p2}, Lcom/aspiro/wamp/mix/model/Mix;->getId()Ljava/lang/String;
|
||||||
|
move-result-object p2
|
||||||
|
invoke-virtual {p2}, Ljava/lang/String;->hashCode()I
|
||||||
|
move-result v1
|
||||||
|
|
||||||
|
:create
|
||||||
|
new-instance v2, Lradiant/swipe/QueueRequest;
|
||||||
|
invoke-direct {v2, v0, p1, v1}, Lradiant/swipe/QueueRequest;-><init>(ILjava/lang/Object;I)V
|
||||||
|
invoke-direct {p0, v2}, Lradiant/swipe/UnifiedSearchResolver;->current(Lradiant/swipe/QueueRequest;)Ljava/lang/Object;
|
||||||
|
move-result-object p1
|
||||||
|
if-eqz p1, :invalid
|
||||||
|
return-object v2
|
||||||
|
|
||||||
|
:invalid
|
||||||
|
const/4 p1, 0x0
|
||||||
|
return-object p1
|
||||||
|
.end method
|
||||||
@@ -438,7 +438,11 @@
|
|||||||
"radiant/swipe/DynamicTrackResolver.smali",
|
"radiant/swipe/DynamicTrackResolver.smali",
|
||||||
"radiant/swipe/MyAlbumsResolver.smali",
|
"radiant/swipe/MyAlbumsResolver.smali",
|
||||||
"radiant/swipe/MyPlaylistsResolver.smali",
|
"radiant/swipe/MyPlaylistsResolver.smali",
|
||||||
"radiant/swipe/MyMixesAndRadioResolver.smali"
|
"radiant/swipe/MyMixesAndRadioResolver.smali",
|
||||||
|
"radiant/swipe/SearchAlbumsResolver.smali",
|
||||||
|
"radiant/swipe/SearchPlaylistsResolver.smali",
|
||||||
|
"radiant/swipe/PlaylistItemsResolver.smali",
|
||||||
|
"radiant/swipe/UnifiedSearchResolver.smali"
|
||||||
],
|
],
|
||||||
"title": "Swipe to Queue",
|
"title": "Swipe to Queue",
|
||||||
"description": "Swipe on tracks/albums/playlists to add them to the play queue",
|
"description": "Swipe on tracks/albums/playlists to add them to the play queue",
|
||||||
|
|||||||
@@ -377,3 +377,55 @@
|
|||||||
.line 122
|
.line 122
|
||||||
new-instance p2, Landroidx/recyclerview/widget/LinearLayoutManager;
|
new-instance p2, Landroidx/recyclerview/widget/LinearLayoutManager;
|
||||||
|
|
||||||
|
--- a/com/aspiro/wamp/mycollection/subpages/albums/search/SearchAlbumsView.smali
|
||||||
|
+++ b/com/aspiro/wamp/mycollection/subpages/albums/search/SearchAlbumsView.smali
|
||||||
|
@@ -1176,6 +1176,8 @@
|
||||||
|
.line 69
|
||||||
|
.line 70
|
||||||
|
.line 71
|
||||||
|
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/SearchAlbumsResolver;->install(Lcom/aspiro/wamp/mycollection/subpages/albums/search/SearchAlbumsView;Landroidx/recyclerview/widget/RecyclerView;)V
|
||||||
|
+
|
||||||
|
.line 72
|
||||||
|
.line 73
|
||||||
|
.line 74
|
||||||
|
--- a/com/aspiro/wamp/playlist/ui/fragment/PlaylistFragment.smali
|
||||||
|
+++ b/com/aspiro/wamp/playlist/ui/fragment/PlaylistFragment.smali
|
||||||
|
@@ -5193,6 +5193,8 @@
|
||||||
|
.line 127
|
||||||
|
.line 128
|
||||||
|
.line 129
|
||||||
|
invoke-static {v1, p1}, 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 {p1}, Lradiant/swipe/PlaylistItemsResolver;->install(Lcom/aspiro/wamp/playlist/ui/items/PlaylistItemCollectionView;)V
|
||||||
|
+
|
||||||
|
.line 130
|
||||||
|
.line 131
|
||||||
|
.line 132
|
||||||
|
--- a/com/aspiro/wamp/search/v2/UnifiedSearchView.smali
|
||||||
|
+++ b/com/aspiro/wamp/search/v2/UnifiedSearchView.smali
|
||||||
|
@@ -1596,6 +1596,8 @@
|
||||||
|
.line 60
|
||||||
|
.line 61
|
||||||
|
.line 62
|
||||||
|
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/UnifiedSearchResolver;->install(Lcom/aspiro/wamp/search/v2/UnifiedSearchView;Landroidx/recyclerview/widget/RecyclerView;)V
|
||||||
|
+
|
||||||
|
.line 63
|
||||||
|
.line 64
|
||||||
|
.line 65
|
||||||
|
--- a/com/aspiro/wamp/mycollection/subpages/playlists/searchplaylists/SearchPlaylistsView.smali
|
||||||
|
+++ b/com/aspiro/wamp/mycollection/subpages/playlists/searchplaylists/SearchPlaylistsView.smali
|
||||||
|
@@ -1204,6 +1204,8 @@
|
||||||
|
.line 69
|
||||||
|
.line 70
|
||||||
|
.line 71
|
||||||
|
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/SearchPlaylistsResolver;->install(Lcom/aspiro/wamp/mycollection/subpages/playlists/searchplaylists/SearchPlaylistsView;Landroidx/recyclerview/widget/RecyclerView;)V
|
||||||
|
+
|
||||||
|
.line 72
|
||||||
|
.line 73
|
||||||
|
.line 74
|
||||||
Reference in new issue
Block a user