240 lines
8.9 KiB
Smali
240 lines
8.9 KiB
Smali
.class Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HasViewHolder;
|
|
.super Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;
|
|
.source "WidgetSearchSuggestionsAdapter.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x8
|
|
name = "HasViewHolder"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder<",
|
|
"Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter;",
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field private container:Landroid/view/View;
|
|
|
|
.field private iconImageView:Landroid/widget/ImageView;
|
|
|
|
.field private labelTextView:Landroid/widget/TextView;
|
|
|
|
.field final searchStringProvider:Lcom/discord/utilities/search/strings/SearchStringProvider;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter;)V
|
|
.locals 1
|
|
|
|
const v0, 0x7f0d016a
|
|
|
|
invoke-direct {p0, v0, p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;-><init>(ILcom/discord/utilities/mg_recycler/MGRecyclerAdapter;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HasViewHolder;->itemView:Landroid/view/View;
|
|
|
|
const v0, 0x7f0a05bc
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HasViewHolder;->container:Landroid/view/View;
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HasViewHolder;->itemView:Landroid/view/View;
|
|
|
|
const v0, 0x7f0a05c1
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/widget/ImageView;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HasViewHolder;->iconImageView:Landroid/widget/ImageView;
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HasViewHolder;->itemView:Landroid/view/View;
|
|
|
|
const v0, 0x7f0a05c2
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/widget/TextView;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HasViewHolder;->labelTextView:Landroid/widget/TextView;
|
|
|
|
new-instance p1, Lcom/discord/utilities/search/strings/ContextSearchStringProvider;
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HasViewHolder;->container:Landroid/view/View;
|
|
|
|
invoke-virtual {v0}, Landroid/view/View;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, v0}, Lcom/discord/utilities/search/strings/ContextSearchStringProvider;-><init>(Landroid/content/Context;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HasViewHolder;->searchStringProvider:Lcom/discord/utilities/search/strings/SearchStringProvider;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private static getIconRes(Lcom/discord/utilities/search/query/node/answer/HasAnswerOption;)I
|
|
.locals 1
|
|
|
|
sget-object v0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$1;->$SwitchMap$com$discord$utilities$search$query$node$answer$HasAnswerOption:[I
|
|
|
|
invoke-virtual {p0}, Lcom/discord/utilities/search/query/node/answer/HasAnswerOption;->ordinal()I
|
|
|
|
move-result p0
|
|
|
|
aget p0, v0, p0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-eq p0, v0, :cond_4
|
|
|
|
const/4 v0, 0x2
|
|
|
|
if-eq p0, v0, :cond_3
|
|
|
|
const/4 v0, 0x3
|
|
|
|
if-eq p0, v0, :cond_2
|
|
|
|
const/4 v0, 0x4
|
|
|
|
if-eq p0, v0, :cond_1
|
|
|
|
const/4 v0, 0x5
|
|
|
|
if-eq p0, v0, :cond_0
|
|
|
|
const p0, 0x7f0403b2
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
const p0, 0x7f0403af
|
|
|
|
return p0
|
|
|
|
:cond_1
|
|
const p0, 0x7f0403b5
|
|
|
|
return p0
|
|
|
|
:cond_2
|
|
const p0, 0x7f0403b1
|
|
|
|
return p0
|
|
|
|
:cond_3
|
|
const p0, 0x7f0403b6
|
|
|
|
return p0
|
|
|
|
:cond_4
|
|
const p0, 0x7f0403ac
|
|
|
|
return p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public synthetic lambda$onConfigure$0$WidgetSearchSuggestionsAdapter$HasViewHolder(Lcom/discord/utilities/search/suggestion/entries/HasSuggestion;Landroid/view/View;)V
|
|
.locals 0
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HasViewHolder;->adapter:Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;
|
|
|
|
check-cast p2, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter;
|
|
|
|
invoke-static {p2}, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter;->access$000(Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter;)Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$OnSuggestionClickedListener;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/search/suggestion/entries/HasSuggestion;->getHasAnswerOption()Lcom/discord/utilities/search/query/node/answer/HasAnswerOption;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p2, p1}, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$OnSuggestionClickedListener;->onHasClicked(Lcom/discord/utilities/search/query/node/answer/HasAnswerOption;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method protected onConfigure(ILcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;)V
|
|
.locals 2
|
|
|
|
invoke-super {p0, p1, p2}, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;->onConfigure(ILjava/lang/Object;)V
|
|
|
|
check-cast p2, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HasItem;
|
|
|
|
iget-object p1, p2, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HasItem;->data:Ljava/lang/Object;
|
|
|
|
check-cast p1, Lcom/discord/utilities/search/suggestion/entries/HasSuggestion;
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HasViewHolder;->labelTextView:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/search/suggestion/entries/HasSuggestion;->getHasAnswerOption()Lcom/discord/utilities/search/query/node/answer/HasAnswerOption;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HasViewHolder;->searchStringProvider:Lcom/discord/utilities/search/strings/SearchStringProvider;
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/search/query/node/answer/HasAnswerOption;->getLocalizedInputText(Lcom/discord/utilities/search/strings/SearchStringProvider;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p2, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HasViewHolder;->iconImageView:Landroid/widget/ImageView;
|
|
|
|
invoke-virtual {p2}, Landroid/widget/ImageView;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/search/suggestion/entries/HasSuggestion;->getHasAnswerOption()Lcom/discord/utilities/search/query/node/answer/HasAnswerOption;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v1}, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HasViewHolder;->getIconRes(Lcom/discord/utilities/search/query/node/answer/HasAnswerOption;)I
|
|
|
|
move-result v1
|
|
|
|
invoke-static {v0, v1}, Lcom/discord/utilities/drawable/DrawableCompat;->getThemedDrawableRes(Landroid/content/Context;I)I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p2, v0}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HasViewHolder;->container:Landroid/view/View;
|
|
|
|
new-instance v0, Lcom/discord/widgets/search/suggestions/-$$Lambda$WidgetSearchSuggestionsAdapter$HasViewHolder$G7C3oe7ZqUmu90febNXQXaW6s80;
|
|
|
|
invoke-direct {v0, p0, p1}, Lcom/discord/widgets/search/suggestions/-$$Lambda$WidgetSearchSuggestionsAdapter$HasViewHolder$G7C3oe7ZqUmu90febNXQXaW6s80;-><init>(Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HasViewHolder;Lcom/discord/utilities/search/suggestion/entries/HasSuggestion;)V
|
|
|
|
invoke-virtual {p2, v0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public bridge synthetic onConfigure(ILjava/lang/Object;)V
|
|
.locals 0
|
|
|
|
check-cast p2, Lcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HasViewHolder;->onConfigure(ILcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;)V
|
|
|
|
return-void
|
|
.end method
|