141 lines
3.8 KiB
Smali
141 lines
3.8 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 public 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/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
:try_start_0
|
|
invoke-virtual {p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->getRecycler()Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->getRecycler()Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Landroidx/recyclerview/widget/RecyclerView;->getLayoutManager()Landroidx/recyclerview/widget/RecyclerView$LayoutManager;
|
|
|
|
move-result-object v2
|
|
|
|
instance-of v3, v2, Landroidx/recyclerview/widget/LinearLayoutManager;
|
|
|
|
if-nez v3, :cond_0
|
|
|
|
move-object v2, v0
|
|
|
|
:cond_0
|
|
check-cast v2, Landroidx/recyclerview/widget/LinearLayoutManager;
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-virtual {v2}, Landroidx/recyclerview/widget/LinearLayoutManager;->getOrientation()I
|
|
|
|
move-result v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v2, 0x1
|
|
|
|
:goto_0
|
|
new-instance v4, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$LoggingLinearLayoutManager;
|
|
|
|
invoke-direct {v4, p1, v2}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$LoggingLinearLayoutManager;-><init>(Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;I)V
|
|
|
|
invoke-virtual {v1, v4}, Landroidx/recyclerview/widget/RecyclerView;->setLayoutManager(Landroidx/recyclerview/widget/RecyclerView$LayoutManager;)V
|
|
|
|
invoke-virtual {v1, p1}, Landroidx/recyclerview/widget/RecyclerView;->setAdapter(Landroidx/recyclerview/widget/RecyclerView$Adapter;)V
|
|
|
|
invoke-virtual {v1, v3}, Landroidx/recyclerview/widget/RecyclerView;->setHasFixedSize(Z)V
|
|
|
|
invoke-virtual {v1}, Landroidx/recyclerview/widget/RecyclerView;->getItemAnimator()Landroidx/recyclerview/widget/RecyclerView$ItemAnimator;
|
|
|
|
move-result-object v1
|
|
|
|
instance-of v2, v1, Landroidx/recyclerview/widget/SimpleItemAnimator;
|
|
|
|
if-nez v2, :cond_2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
move-object v0, v1
|
|
|
|
:goto_1
|
|
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;
|
|
|
|
invoke-direct {v0, p1}, Ljava/lang/RuntimeException;-><init>(Ljava/lang/Throwable;)V
|
|
|
|
throw v0
|
|
|
|
:cond_4
|
|
const-string p1, "adapter"
|
|
|
|
invoke-static {p1}, Ly/v/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|