143 lines
4 KiB
Smali
143 lines
4 KiB
Smali
|
.class public final Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$Companion;
|
||
|
.super Ljava/lang/Object;
|
||
|
.source "MGRecyclerAdapter.kt"
|
||
|
|
||
|
|
||
|
# annotations
|
||
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
||
|
value = Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;
|
||
|
.end annotation
|
||
|
|
||
|
.annotation system Ldalvik/annotation/InnerClass;
|
||
|
accessFlags = 0x19
|
||
|
name = "Companion"
|
||
|
.end annotation
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method private constructor <init>()V
|
||
|
.locals 0
|
||
|
|
||
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
||
|
.locals 0
|
||
|
|
||
|
invoke-direct {p0}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$Companion;-><init>()V
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
|
||
|
# virtual methods
|
||
|
.method public final configure(Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;)Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;
|
||
|
.locals 5
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"<D:",
|
||
|
"Ljava/lang/Object;",
|
||
|
"T:",
|
||
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter<",
|
||
|
"TD;>;>(TT;)TT;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
const-string v0, "adapter"
|
||
|
|
||
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/k;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
:try_start_0
|
||
|
invoke-virtual {p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->getRecycler()Landroidx/recyclerview/widget/RecyclerView;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
invoke-virtual {p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->getRecycler()Landroidx/recyclerview/widget/RecyclerView;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
invoke-virtual {v1}, Landroidx/recyclerview/widget/RecyclerView;->getLayoutManager()Landroidx/recyclerview/widget/RecyclerView$LayoutManager;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
instance-of v2, v1, Landroidx/recyclerview/widget/LinearLayoutManager;
|
||
|
|
||
|
const/4 v3, 0x0
|
||
|
|
||
|
if-nez v2, :cond_0
|
||
|
|
||
|
move-object v1, v3
|
||
|
|
||
|
:cond_0
|
||
|
check-cast v1, Landroidx/recyclerview/widget/LinearLayoutManager;
|
||
|
|
||
|
const/4 v2, 0x1
|
||
|
|
||
|
if-eqz v1, :cond_1
|
||
|
|
||
|
invoke-virtual {v1}, Landroidx/recyclerview/widget/LinearLayoutManager;->getOrientation()I
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_1
|
||
|
const/4 v1, 0x1
|
||
|
|
||
|
:goto_0
|
||
|
new-instance v4, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$LoggingLinearLayoutManager;
|
||
|
|
||
|
invoke-direct {v4, p1, v1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$LoggingLinearLayoutManager;-><init>(Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;I)V
|
||
|
|
||
|
check-cast v4, Landroidx/recyclerview/widget/RecyclerView$LayoutManager;
|
||
|
|
||
|
invoke-virtual {v0, v4}, Landroidx/recyclerview/widget/RecyclerView;->setLayoutManager(Landroidx/recyclerview/widget/RecyclerView$LayoutManager;)V
|
||
|
|
||
|
move-object v1, p1
|
||
|
|
||
|
check-cast v1, Landroidx/recyclerview/widget/RecyclerView$Adapter;
|
||
|
|
||
|
invoke-virtual {v0, v1}, Landroidx/recyclerview/widget/RecyclerView;->setAdapter(Landroidx/recyclerview/widget/RecyclerView$Adapter;)V
|
||
|
|
||
|
invoke-virtual {v0, v2}, Landroidx/recyclerview/widget/RecyclerView;->setHasFixedSize(Z)V
|
||
|
|
||
|
invoke-virtual {v0}, Landroidx/recyclerview/widget/RecyclerView;->getItemAnimator()Landroidx/recyclerview/widget/RecyclerView$ItemAnimator;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
instance-of v1, v0, Landroidx/recyclerview/widget/SimpleItemAnimator;
|
||
|
|
||
|
if-nez v1, :cond_2
|
||
|
|
||
|
move-object v0, v3
|
||
|
|
||
|
:cond_2
|
||
|
check-cast v0, Landroidx/recyclerview/widget/SimpleItemAnimator;
|
||
|
|
||
|
if-eqz v0, :cond_3
|
||
|
|
||
|
const/4 v1, 0x0
|
||
|
|
||
|
invoke-virtual {v0, v1}, Landroidx/recyclerview/widget/SimpleItemAnimator;->setSupportsChangeAnimations(Z)V
|
||
|
:try_end_0
|
||
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
||
|
|
||
|
:cond_3
|
||
|
return-object p1
|
||
|
|
||
|
:catch_0
|
||
|
move-exception p1
|
||
|
|
||
|
new-instance v0, Ljava/lang/RuntimeException;
|
||
|
|
||
|
check-cast p1, Ljava/lang/Throwable;
|
||
|
|
||
|
invoke-direct {v0, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
|
||
|
|
||
|
check-cast v0, Ljava/lang/Throwable;
|
||
|
|
||
|
throw v0
|
||
|
.end method
|