157 lines
4.3 KiB
Smali
157 lines
4.3 KiB
Smali
.class public final Lcom/discord/utilities/simple_pager/SimplePager$Adapter;
|
|
.super Landroidx/fragment/app/FragmentPagerAdapter;
|
|
.source "SimplePager.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/utilities/simple_pager/SimplePager;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Adapter"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/utilities/simple_pager/SimplePager$Adapter$Item;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private final items:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/utilities/simple_pager/SimplePager$Adapter$Item;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public varargs constructor <init>(Landroidx/fragment/app/FragmentManager;[Lcom/discord/utilities/simple_pager/SimplePager$Adapter$Item;)V
|
|
.locals 1
|
|
|
|
const-string v0, "fm"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "items"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p1}, Landroidx/fragment/app/FragmentPagerAdapter;-><init>(Landroidx/fragment/app/FragmentManager;)V
|
|
|
|
invoke-static {p2}, Lkotlin/a/g;->asList([Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/utilities/simple_pager/SimplePager$Adapter;->items:Ljava/util/List;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final getCount()I
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/simple_pager/SimplePager$Adapter;->items:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final getItem(I)Landroidx/fragment/app/Fragment;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/simple_pager/SimplePager$Adapter;->items:Ljava/util/List;
|
|
|
|
invoke-static {v0, p1}, Lkotlin/a/m;->getOrNull(Ljava/util/List;I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/utilities/simple_pager/SimplePager$Adapter$Item;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/simple_pager/SimplePager$Adapter$Item;->getCreator$utils_release()Lkotlin/jvm/functions/Function0;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-interface {v0}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroidx/fragment/app/Fragment;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, "Invalid position: "
|
|
|
|
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const/16 p1, 0x2e
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast v0, Ljava/lang/Throwable;
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final getPageTitle(I)Ljava/lang/CharSequence;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/simple_pager/SimplePager$Adapter;->items:Ljava/util/List;
|
|
|
|
invoke-static {v0, p1}, Lkotlin/a/m;->getOrNull(Ljava/util/List;I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/utilities/simple_pager/SimplePager$Adapter$Item;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/simple_pager/SimplePager$Adapter$Item;->getTitle$utils_release()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
check-cast v0, Ljava/lang/CharSequence;
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
invoke-super {p0, p1}, Landroidx/fragment/app/FragmentPagerAdapter;->getPageTitle(I)Ljava/lang/CharSequence;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|