390 lines
13 KiB
Smali
390 lines
13 KiB
Smali
.class public final Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;
|
|
.super Lcom/discord/app/AppBottomSheet;
|
|
.source "WidgetSpectatorsSheet.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic $$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
.field public static final ARG_STREAM_KEY:Ljava/lang/String; = "STREAM_KEY"
|
|
|
|
.field public static final Companion:Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet$Companion;
|
|
|
|
|
|
# instance fields
|
|
.field public final headerTextView$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public participantsAdapter:Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter;
|
|
|
|
.field public final recyclerView$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public viewModel:Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheetViewModel;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 6
|
|
|
|
const/4 v0, 0x2
|
|
|
|
new-array v0, v0, [Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v1, Ly/u/b/u;
|
|
|
|
const-class v2, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;
|
|
|
|
invoke-static {v2}, Ly/u/b/x;->getOrCreateKotlinClass(Ljava/lang/Class;)Ly/y/b;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "headerTextView"
|
|
|
|
const-string v4, "getHeaderTextView()Landroid/widget/TextView;"
|
|
|
|
invoke-direct {v1, v2, v3, v4}, Ly/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v2, Ly/u/b/x;->a:Ly/u/b/y;
|
|
|
|
invoke-virtual {v2, v1}, Ly/u/b/y;->property1(Ly/u/b/t;)Ly/y/d;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-instance v2, Ly/u/b/u;
|
|
|
|
const-class v3, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;
|
|
|
|
invoke-static {v3}, Ly/u/b/x;->getOrCreateKotlinClass(Ljava/lang/Class;)Ly/y/b;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, "recyclerView"
|
|
|
|
const-string v5, "getRecyclerView()Landroidx/recyclerview/widget/RecyclerView;"
|
|
|
|
invoke-direct {v2, v3, v4, v5}, Ly/u/b/u;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
sget-object v3, Ly/u/b/x;->a:Ly/u/b/y;
|
|
|
|
invoke-virtual {v3, v2}, Ly/u/b/y;->property1(Ly/u/b/t;)Ly/y/d;
|
|
|
|
aput-object v2, v0, v1
|
|
|
|
sput-object v0, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v0, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;->Companion:Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet$Companion;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Lcom/discord/app/AppBottomSheet;-><init>()V
|
|
|
|
const v0, 0x7f0a03a2
|
|
|
|
invoke-static {p0, v0}, Lf/n/a/j/a;->a(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;->headerTextView$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a03a3
|
|
|
|
invoke-static {p0, v0}, Lf/n/a/j/a;->a(Landroidx/fragment/app/DialogFragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;->recyclerView$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$configureUI(Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheetViewModel$ViewState;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;->configureUI(Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheetViewModel$ViewState;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final configureUI(Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheetViewModel$ViewState;)V
|
|
.locals 5
|
|
|
|
instance-of v0, p1, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheetViewModel$ViewState$Loaded;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;->getHeaderTextView()Landroid/widget/TextView;
|
|
|
|
move-result-object v0
|
|
|
|
const v1, 0x7f1215fd
|
|
|
|
const/4 v2, 0x1
|
|
|
|
new-array v2, v2, [Ljava/lang/Object;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
check-cast p1, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheetViewModel$ViewState$Loaded;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheetViewModel$ViewState$Loaded;->getStreamerName()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
aput-object v4, v2, v3
|
|
|
|
invoke-virtual {p0, v1, v2}, Landroidx/fragment/app/Fragment;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "getString(R.string.watch\u2026, viewState.streamerName)"
|
|
|
|
invoke-static {v1, v2}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v1}, Lcom/discord/utilities/textprocessing/Parsers;->parseBoldMarkdown(Ljava/lang/CharSequence;)Ljava/lang/CharSequence;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;->participantsAdapter:Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheetViewModel$ViewState$Loaded;->getListItems()Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;->setData(Ljava/util/List;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string p1, "participantsAdapter"
|
|
|
|
invoke-static {p1}, Ly/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
|
|
:cond_1
|
|
instance-of p1, p1, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheetViewModel$ViewState$Invalid;
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppBottomSheet;->dismiss()V
|
|
|
|
:cond_2
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getHeaderTextView()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;->headerTextView$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/TextView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getRecyclerView()Landroidx/recyclerview/widget/RecyclerView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;->recyclerView$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getContentViewResId()I
|
|
.locals 1
|
|
|
|
const v0, 0x7f0d01a8
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onResume()V
|
|
.locals 10
|
|
|
|
invoke-super {p0}, Lcom/discord/app/AppBottomSheet;->onResume()V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;->viewModel:Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheetViewModel;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Lf/a/b/b0;->observeViewState()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, p0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->bindToComponentLifecycle(Lrx/Observable;Lcom/discord/app/AppComponent;)Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
const-class v2, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
new-instance v7, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet$onResume$1;
|
|
|
|
invoke-direct {v7, p0}, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet$onResume$1;-><init>(Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;)V
|
|
|
|
const/16 v8, 0x1e
|
|
|
|
const/4 v9, 0x0
|
|
|
|
invoke-static/range {v1 .. v9}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->appSubscribe$default(Lrx/Observable;Ljava/lang/Class;Landroid/content/Context;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function0;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string v0, "viewModel"
|
|
|
|
invoke-static {v0}, Ly/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public onViewCreated(Landroid/view/View;Landroid/os/Bundle;)V
|
|
.locals 4
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-super {p0, p1, p2}, Lcom/discord/app/AppBottomSheet;->onViewCreated(Landroid/view/View;Landroid/os/Bundle;)V
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppBottomSheet;->getArgumentsOrDefault()Landroid/os/Bundle;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "STREAM_KEY"
|
|
|
|
invoke-virtual {p1, p2}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const-string p2, "argumentsOrDefault.getString(ARG_STREAM_KEY)!!"
|
|
|
|
invoke-static {p1, p2}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance p2, Landroidx/lifecycle/ViewModelProvider;
|
|
|
|
new-instance v1, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheetViewModel$Factory;
|
|
|
|
invoke-direct {v1, p1}, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheetViewModel$Factory;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-direct {p2, p0, v1}, Landroidx/lifecycle/ViewModelProvider;-><init>(Landroidx/lifecycle/ViewModelStoreOwner;Landroidx/lifecycle/ViewModelProvider$Factory;)V
|
|
|
|
const-class p1, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheetViewModel;
|
|
|
|
invoke-virtual {p2, p1}, Landroidx/lifecycle/ViewModelProvider;->get(Ljava/lang/Class;)Landroidx/lifecycle/ViewModel;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "ViewModelProvider(\n \u2026eetViewModel::class.java)"
|
|
|
|
invoke-static {p1, p2}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheetViewModel;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;->viewModel:Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheetViewModel;
|
|
|
|
sget-object p1, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;->Companion:Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$Companion;
|
|
|
|
new-instance p2, Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter;
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;->getRecyclerView()Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-direct {p2, v1, v3, v2, v0}, Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter;-><init>(Landroidx/recyclerview/widget/RecyclerView;ZILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
invoke-virtual {p1, p2}, Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter$Companion;->configure(Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;)Lcom/discord/utilities/mg_recycler/MGRecyclerAdapter;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;->participantsAdapter:Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter;
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetSpectatorsSheet;->getRecyclerView()Landroidx/recyclerview/widget/RecyclerView;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, v3}, Landroidx/recyclerview/widget/RecyclerView;->setHasFixedSize(Z)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
invoke-static {}, Ly/u/b/j;->throwNpe()V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "view"
|
|
|
|
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|