165 lines
6.6 KiB
Smali
165 lines
6.6 KiB
Smali
.class public Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions;
|
|
.super Lcom/discord/app/AppFragment;
|
|
.source "WidgetSearchSuggestions.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions$Model;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public adapter:Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter;
|
|
|
|
.field public searchStringProvider:Lcom/discord/utilities/search/strings/SearchStringProvider;
|
|
|
|
.field public suggestionsRecycler:Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/app/AppFragment;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic a(Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions;Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions$Model;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions;->configureUI(Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions$Model;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic access$000(Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions;)Lcom/discord/utilities/search/strings/SearchStringProvider;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions;->searchStringProvider:Lcom/discord/utilities/search/strings/SearchStringProvider;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private configureUI(Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions$Model;)V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions;->adapter:Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions$Model;->getSuggestionItems()Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;->setData(Ljava/util/List;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions;->adapter:Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter;
|
|
|
|
new-instance v1, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions$1;
|
|
|
|
invoke-direct {v1, p0, p1}, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions$1;-><init>(Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions;Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions$Model;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter;->setOnSuggestionClickedListener(Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter$OnSuggestionClickedListener;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getContentViewResId()I
|
|
.locals 1
|
|
|
|
const v0, 0x7f0d01e8
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onViewBound(Landroid/view/View;)V
|
|
.locals 1
|
|
.param p1 # Landroid/view/View;
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
.end annotation
|
|
.end param
|
|
|
|
invoke-super {p0, p1}, Lcom/discord/app/AppFragment;->onViewBound(Landroid/view/View;)V
|
|
|
|
const v0, 0x7f0a06e1
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions;->suggestionsRecycler:Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
new-instance p1, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter;
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions;->suggestionsRecycler:Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
invoke-direct {p1, v0}, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter;-><init>(Landroidx/recyclerview/widget/RecyclerView;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions;->adapter:Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter;
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions;->adapter:Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter;
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->configure(Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;)Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions;->adapter:Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestionsAdapter;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onViewBoundOrOnResume()V
|
|
.locals 3
|
|
|
|
invoke-super {p0}, Lcom/discord/app/AppFragment;->onViewBoundOrOnResume()V
|
|
|
|
new-instance v0, Lcom/discord/utilities/search/strings/ContextSearchStringProvider;
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/utilities/search/strings/ContextSearchStringProvider;-><init>(Landroid/content/Context;)V
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions;->searchStringProvider:Lcom/discord/utilities/search/strings/SearchStringProvider;
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions;->searchStringProvider:Lcom/discord/utilities/search/strings/SearchStringProvider;
|
|
|
|
invoke-static {v0}, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions$Model;->get(Lcom/discord/utilities/search/strings/SearchStringProvider;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p0}, Le/a/b/l;->a(Lcom/discord/app/AppComponent;)Lrx/Observable$c;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Le/a/k/d/o/a;
|
|
|
|
invoke-direct {v1, p0}, Le/a/k/d/o/a;-><init>(Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions;)V
|
|
|
|
const-class v2, Lcom/discord/widgets/search/suggestions/WidgetSearchSuggestions;
|
|
|
|
invoke-static {v1, v2}, Le/a/b/l;->a(Lrx/functions/Action1;Ljava/lang/Class;)Lrx/Observable$c;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
return-void
|
|
.end method
|