191 lines
5.7 KiB
Smali
191 lines
5.7 KiB
Smali
.class public Lcom/discord/widgets/chat/input/WidgetChatInputCommandsAdapter;
|
|
.super Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;
|
|
.source "WidgetChatInputCommandsAdapter.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/chat/input/WidgetChatInputCommandsAdapter$Item;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple<",
|
|
"Lcom/discord/widgets/chat/input/WidgetChatInputCommandsModel;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final onClickAction:Lrx/functions/Action1;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/functions/Action1<",
|
|
"Lcom/discord/widgets/chat/input/WidgetChatInputCommandsModel;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public slashCommandsEnabled:Z
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroidx/recyclerview/widget/RecyclerView;Lrx/functions/Action1;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroidx/recyclerview/widget/RecyclerView;",
|
|
"Lrx/functions/Action1<",
|
|
"Lcom/discord/widgets/chat/input/WidgetChatInputCommandsModel;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;-><init>(Landroidx/recyclerview/widget/RecyclerView;)V
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/chat/input/WidgetChatInputCommandsAdapter;->onClickAction:Lrx/functions/Action1;
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getExperiments()Lcom/discord/stores/StoreExperiments;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "2020-11_android_app_slash_commands"
|
|
|
|
const/4 v0, 0x1
|
|
|
|
invoke-virtual {p1, p2, v0}, Lcom/discord/stores/StoreExperiments;->getUserExperiment(Ljava/lang/String;Z)Lcom/discord/models/experiments/domain/Experiment;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/experiments/domain/Experiment;->getBucket()I
|
|
|
|
move-result p1
|
|
|
|
if-ne p1, v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
iput-boolean v0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputCommandsAdapter;->slashCommandsEnabled:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public bridge synthetic onCreateViewHolder(Landroid/view/ViewGroup;I)Landroidx/recyclerview/widget/RecyclerView$ViewHolder;
|
|
.locals 0
|
|
.param p1 # Landroid/view/ViewGroup;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/widgets/chat/input/WidgetChatInputCommandsAdapter;->onCreateViewHolder(Landroid/view/ViewGroup;I)Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public onCreateViewHolder(Landroid/view/ViewGroup;I)Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;
|
|
.locals 1
|
|
.param p1 # Landroid/view/ViewGroup;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Landroid/view/ViewGroup;",
|
|
"I)",
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder<",
|
|
"*",
|
|
"Lcom/discord/widgets/chat/input/WidgetChatInputCommandsModel;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-boolean p1, p0, Lcom/discord/widgets/chat/input/WidgetChatInputCommandsAdapter;->slashCommandsEnabled:Z
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const p1, 0x7f0d01a8
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const p1, 0x7f0d01ab
|
|
|
|
:goto_0
|
|
new-instance p2, Lcom/discord/widgets/chat/input/WidgetChatInputCommandsAdapter$Item;
|
|
|
|
iget-boolean v0, p0, Lcom/discord/widgets/chat/input/WidgetChatInputCommandsAdapter;->slashCommandsEnabled:Z
|
|
|
|
invoke-direct {p2, p1, p0, v0}, Lcom/discord/widgets/chat/input/WidgetChatInputCommandsAdapter$Item;-><init>(ILcom/discord/widgets/chat/input/WidgetChatInputCommandsAdapter;Z)V
|
|
|
|
return-object p2
|
|
.end method
|
|
|
|
.method public setData(Ljava/util/List;)V
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/widgets/chat/input/WidgetChatInputCommandsModel;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->getRecycler()Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/view/ViewGroup;->getLayoutParams()Landroid/view/ViewGroup$LayoutParams;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p1}, Ljava/util/List;->size()I
|
|
|
|
move-result v1
|
|
|
|
mul-int/lit8 v1, v1, 0x2c
|
|
|
|
const/16 v2, 0xb0
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Math;->min(II)I
|
|
|
|
move-result v1
|
|
|
|
invoke-static {v1}, Lcom/discord/utilities/dimen/DimenUtils;->dpToPixels(I)I
|
|
|
|
move-result v1
|
|
|
|
iput v1, v0, Landroid/view/ViewGroup$LayoutParams;->height:I
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->getRecycler()Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroidx/recyclerview/widget/RecyclerView;->requestLayout()V
|
|
|
|
invoke-super {p0, p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;->setData(Ljava/util/List;)V
|
|
|
|
return-void
|
|
.end method
|