2020-08-20 22:29:33 +00:00
|
|
|
.class public final Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HeaderViewHolder;
|
2020-05-17 12:40:10 +00:00
|
|
|
.super Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;
|
2020-08-20 22:29:33 +00:00
|
|
|
.source "WidgetSearchSuggestionsAdapter.kt"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
|
|
value = Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
2020-08-20 22:29:33 +00:00
|
|
|
accessFlags = 0x19
|
2020-05-17 12:40:10 +00:00
|
|
|
name = "HeaderViewHolder"
|
|
|
|
.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
|
2020-08-20 22:29:33 +00:00
|
|
|
.field public final headerTextView:Landroid/widget/TextView;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter;)V
|
|
|
|
.locals 1
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
const-string v0, "searchSuggestionsAdapter"
|
2020-08-20 22:29:33 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
const v0, 0x7f0d0231
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-direct {p0, v0, p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerViewHolder;-><init>(ILcom/discord/utilities/mg_recycler/MGRecyclerAdapter;)V
|
|
|
|
|
|
|
|
iget-object p1, p0, Landroidx/recyclerview/widget/RecyclerView$ViewHolder;->itemView:Landroid/view/View;
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
const v0, 0x7f0a09b2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-08-20 22:29:33 +00:00
|
|
|
const-string v0, "itemView.findViewById(R.id.suggestion_item_header)"
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-08-20 22:29:33 +00:00
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
check-cast p1, Landroid/widget/TextView;
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HeaderViewHolder;->headerTextView:Landroid/widget/TextView;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-08-20 22:29:33 +00:00
|
|
|
.method private final getCategoryLabel(Lcom/discord/utilities/search/suggestion/entries/SearchSuggestion$Category;)I
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 3
|
|
|
|
|
2020-08-20 22:29:33 +00:00
|
|
|
if-eqz p1, :cond_5
|
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
invoke-virtual {p1}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
2020-08-20 22:29:33 +00:00
|
|
|
if-eqz v0, :cond_4
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
2020-08-20 22:29:33 +00:00
|
|
|
if-eq v0, v1, :cond_3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v1, 0x2
|
|
|
|
|
2020-08-20 22:29:33 +00:00
|
|
|
if-eq v0, v1, :cond_2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v1, 0x3
|
|
|
|
|
2020-08-20 22:29:33 +00:00
|
|
|
if-eq v0, v1, :cond_1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v1, 0x4
|
|
|
|
|
2020-08-20 22:29:33 +00:00
|
|
|
if-eq v0, v1, :cond_0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v1, 0x5
|
|
|
|
|
2020-08-20 22:29:33 +00:00
|
|
|
if-ne v0, v1, :cond_5
|
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
const p1, 0x7f121462
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-20 22:29:33 +00:00
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
2020-09-09 19:21:20 +00:00
|
|
|
const p1, 0x7f121463
|
2020-08-20 22:29:33 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
2020-09-09 19:21:20 +00:00
|
|
|
const p1, 0x7f121466
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-20 22:29:33 +00:00
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
2020-09-09 19:21:20 +00:00
|
|
|
const p1, 0x7f121465
|
2020-08-20 22:29:33 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_3
|
2020-09-09 19:21:20 +00:00
|
|
|
const p1, 0x7f121469
|
2020-08-20 22:29:33 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_4
|
2020-09-09 19:21:20 +00:00
|
|
|
const p1, 0x7f12146a
|
2020-08-20 22:29:33 +00:00
|
|
|
|
|
|
|
:goto_0
|
2020-08-18 03:20:31 +00:00
|
|
|
return p1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-20 22:29:33 +00:00
|
|
|
:cond_5
|
2020-08-18 03:20:31 +00:00
|
|
|
new-instance v0, Ljava/lang/IllegalArgumentException;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-18 03:20:31 +00:00
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-18 03:20:31 +00:00
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-18 03:20:31 +00:00
|
|
|
const-string v2, "couldn\'t resolve category: "
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-18 03:20:31 +00:00
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-18 03:20:31 +00:00
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-18 03:20:31 +00:00
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-18 03:20:31 +00:00
|
|
|
move-result-object p1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-18 03:20:31 +00:00
|
|
|
invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-08-18 03:20:31 +00:00
|
|
|
throw v0
|
2020-05-17 12:40:10 +00:00
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public onConfigure(ILcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;)V
|
2020-09-09 19:21:20 +00:00
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const-string v0, "data"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-09 19:21:20 +00:00
|
|
|
invoke-static {p2, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-08-20 22:29:33 +00:00
|
|
|
|
2020-05-17 12:40:10 +00:00
|
|
|
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$HeaderItem;
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HeaderViewHolder;->headerTextView:Landroid/widget/TextView;
|
|
|
|
|
|
|
|
iget-object p2, p2, Lcom/discord/utilities/mg_recycler/SingleTypePayload;->data:Ljava/lang/Object;
|
|
|
|
|
|
|
|
check-cast p2, Lcom/discord/utilities/search/suggestion/entries/SearchSuggestion$Category;
|
|
|
|
|
|
|
|
invoke-direct {p0, p2}, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$HeaderViewHolder;->getCategoryLabel(Lcom/discord/utilities/search/suggestion/entries/SearchSuggestion$Category;)I
|
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Landroid/widget/TextView;->setText(I)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$HeaderViewHolder;->onConfigure(ILcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|