586 lines
20 KiB
Smali
586 lines
20 KiB
Smali
.class public final Lcom/discord/widgets/voice/call/WidgetCallIndicator;
|
|
.super Lcom/discord/app/AppFragment;
|
|
.source "WidgetCallIndicator.kt"
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic $$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
|
|
# instance fields
|
|
.field public final callIndicatorVisibilityObserver:Lcom/discord/utilities/views/ViewVisibilityObserver;
|
|
|
|
.field public final indicatorIcon$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final indicatorRoot$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final indicatorStatus$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public viewModel:Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 5
|
|
|
|
const/4 v0, 0x3
|
|
|
|
new-array v0, v0, [Lkotlin/reflect/KProperty;
|
|
|
|
new-instance v1, Li0/n/c/q;
|
|
|
|
const-class v2, Lcom/discord/widgets/voice/call/WidgetCallIndicator;
|
|
|
|
invoke-static {v2}, Li0/n/c/s;->getOrCreateKotlinClass(Ljava/lang/Class;)Li0/r/b;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "indicatorRoot"
|
|
|
|
const-string v4, "getIndicatorRoot()Landroid/view/ViewGroup;"
|
|
|
|
invoke-direct {v1, v2, v3, v4}, Li0/n/c/q;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-static {v1}, Li0/n/c/s;->property1(Li0/n/c/p;)Li0/r/d;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
new-instance v1, Li0/n/c/q;
|
|
|
|
const-class v2, Lcom/discord/widgets/voice/call/WidgetCallIndicator;
|
|
|
|
invoke-static {v2}, Li0/n/c/s;->getOrCreateKotlinClass(Ljava/lang/Class;)Li0/r/b;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "indicatorStatus"
|
|
|
|
const-string v4, "getIndicatorStatus()Landroid/widget/TextView;"
|
|
|
|
invoke-direct {v1, v2, v3, v4}, Li0/n/c/q;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-static {v1}, Li0/n/c/s;->property1(Li0/n/c/p;)Li0/r/d;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
new-instance v1, Li0/n/c/q;
|
|
|
|
const-class v2, Lcom/discord/widgets/voice/call/WidgetCallIndicator;
|
|
|
|
invoke-static {v2}, Li0/n/c/s;->getOrCreateKotlinClass(Ljava/lang/Class;)Li0/r/b;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, "indicatorIcon"
|
|
|
|
const-string v4, "getIndicatorIcon()Landroid/widget/ImageView;"
|
|
|
|
invoke-direct {v1, v2, v3, v4}, Li0/n/c/q;-><init>(Lkotlin/reflect/KDeclarationContainer;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
invoke-static {v1}, Li0/n/c/s;->property1(Li0/n/c/p;)Li0/r/d;
|
|
|
|
const/4 v2, 0x2
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sput-object v0, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Lcom/discord/app/AppFragment;-><init>()V
|
|
|
|
const v0, 0x7f0a0129
|
|
|
|
invoke-static {p0, v0}, Li0/i/t;->j(Landroidx/fragment/app/Fragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->indicatorRoot$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a012b
|
|
|
|
invoke-static {p0, v0}, Li0/i/t;->j(Landroidx/fragment/app/Fragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->indicatorStatus$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const v0, 0x7f0a012a
|
|
|
|
invoke-static {p0, v0}, Li0/i/t;->j(Landroidx/fragment/app/Fragment;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->indicatorIcon$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v0, Lcom/discord/utilities/views/ViewVisibilityObserverProvider;->INSTANCE:Lcom/discord/utilities/views/ViewVisibilityObserverProvider;
|
|
|
|
const-string v1, "CALL_STATUS_INDICATOR_FEATURE"
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/views/ViewVisibilityObserverProvider;->get(Ljava/lang/String;)Lcom/discord/utilities/views/ViewVisibilityObserver;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->callIndicatorVisibilityObserver:Lcom/discord/utilities/views/ViewVisibilityObserver;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$configureUI(Lcom/discord/widgets/voice/call/WidgetCallIndicator;Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$ViewState;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->configureUI(Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$ViewState;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$configureUIVisibility(Lcom/discord/widgets/voice/call/WidgetCallIndicator;Z)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->configureUIVisibility(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final configureUI(Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$ViewState;)V
|
|
.locals 2
|
|
|
|
instance-of v0, p1, Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$ViewState$Inactive;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->callIndicatorVisibilityObserver:Lcom/discord/utilities/views/ViewVisibilityObserver;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p1, v0}, Lcom/discord/utilities/views/ViewVisibilityObserver;->updateVisibility(Z)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
instance-of v0, p1, Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$ViewState$Active;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->callIndicatorVisibilityObserver:Lcom/discord/utilities/views/ViewVisibilityObserver;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/views/ViewVisibilityObserver;->updateVisibility(Z)V
|
|
|
|
check-cast p1, Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$ViewState$Active;
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->setupContainerClicks(Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$ViewState$Active;)V
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->setupIndicatorStatus(Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$ViewState$Active;)V
|
|
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_1
|
|
new-instance p1, Lkotlin/NoWhenBranchMatchedException;
|
|
|
|
invoke-direct {p1}, Lkotlin/NoWhenBranchMatchedException;-><init>()V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method private final configureUIVisibility(Z)V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->getIndicatorRoot()Landroid/view/ViewGroup;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/16 p1, 0x8
|
|
|
|
:goto_0
|
|
invoke-virtual {v0, p1}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getIndicatorIcon()Landroid/widget/ImageView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->indicatorIcon$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x2
|
|
|
|
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/ImageView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getIndicatorRoot()Landroid/view/ViewGroup;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->indicatorRoot$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->$$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/view/ViewGroup;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getIndicatorStatus()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->indicatorStatus$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->$$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, Landroid/widget/TextView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final setupContainerClicks(Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$ViewState$Active;)V
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->getIndicatorRoot()Landroid/view/ViewGroup;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/widgets/voice/call/WidgetCallIndicator$setupContainerClicks$1;
|
|
|
|
invoke-direct {v1, p0, p1}, Lcom/discord/widgets/voice/call/WidgetCallIndicator$setupContainerClicks$1;-><init>(Lcom/discord/widgets/voice/call/WidgetCallIndicator;Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$ViewState$Active;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final setupIndicatorStatus(Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$ViewState$Active;)V
|
|
.locals 13
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->getIndicatorRoot()Landroid/view/ViewGroup;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/discord/utilities/voice/VoiceViewUtils;->INSTANCE:Lcom/discord/utilities/voice/VoiceViewUtils;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$ViewState$Active;->getConnectionState()Lcom/discord/rtcconnection/RtcConnection$State;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$ViewState$Active;->getConnectionQuality()Lcom/discord/rtcconnection/RtcConnection$Quality;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v5, "requireContext()"
|
|
|
|
invoke-static {v4, v5}, Li0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v1, v2, v3, v4}, Lcom/discord/utilities/voice/VoiceViewUtils;->getConnectionStatusColor(Lcom/discord/rtcconnection/RtcConnection$State;Lcom/discord/rtcconnection/RtcConnection$Quality;Landroid/content/Context;)I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/ViewGroup;->setBackgroundColor(I)V
|
|
|
|
sget-object v6, Lcom/discord/utilities/channel/ChannelUtils;->INSTANCE:Lcom/discord/utilities/channel/ChannelUtils;
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-static {v7, v5}, Li0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$ViewState$Active;->getSelectedVoiceChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelChannel;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$ViewState$Active;->getSelectedVoiceChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelChannel;->getType()I
|
|
|
|
move-result v9
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/16 v11, 0x8
|
|
|
|
const/4 v12, 0x0
|
|
|
|
invoke-static/range {v6 .. v12}, Lcom/discord/utilities/channel/ChannelUtils;->getDisplayName$default(Lcom/discord/utilities/channel/ChannelUtils;Landroid/content/Context;Ljava/lang/String;IZILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/discord/utilities/voice/VoiceViewUtils;->INSTANCE:Lcom/discord/utilities/voice/VoiceViewUtils;
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v2, v5}, Li0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$ViewState$Active;->getConnectionState()Lcom/discord/rtcconnection/RtcConnection$State;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$ViewState$Active;->getStreamContext()Lcom/discord/utilities/streams/StreamContext;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$ViewState$Active;->getHasVideo()Z
|
|
|
|
move-result v5
|
|
|
|
invoke-virtual {v1, v2, v3, v4, v5}, Lcom/discord/utilities/voice/VoiceViewUtils;->getConnectedText(Landroid/content/Context;Lcom/discord/rtcconnection/RtcConnection$State;Lcom/discord/utilities/streams/StreamContext;Z)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$ViewState$Active;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelGuild;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
const-string v3, " / "
|
|
|
|
invoke-static {v2, v3, v0}, Lf/e/b/a/a;->q(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-static {v0}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
:goto_0
|
|
const-string v0, ": "
|
|
|
|
invoke-static {v1, v0, v2}, Lf/e/b/a/a;->q(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->getIndicatorStatus()Landroid/widget/TextView;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->getIndicatorIcon()Landroid/widget/ImageView;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/discord/utilities/voice/VoiceViewUtils;->INSTANCE:Lcom/discord/utilities/voice/VoiceViewUtils;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$ViewState$Active;->getHasVideo()Z
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$ViewState$Active;->getStreamContext()Lcom/discord/utilities/streams/StreamContext;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v1, v2, p1}, Lcom/discord/utilities/voice/VoiceViewUtils;->getCallIndicatorIcon(ZLcom/discord/utilities/streams/StreamContext;)I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {v0, p1}, Landroid/widget/ImageView;->setImageResource(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getContentViewResId()I
|
|
.locals 1
|
|
|
|
const v0, 0x7f0d015a
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onCreate(Landroid/os/Bundle;)V
|
|
.locals 1
|
|
|
|
invoke-super {p0, p1}, Landroidx/fragment/app/Fragment;->onCreate(Landroid/os/Bundle;)V
|
|
|
|
new-instance p1, Landroidx/lifecycle/ViewModelProvider;
|
|
|
|
new-instance v0, Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$Factory;
|
|
|
|
invoke-direct {v0}, Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel$Factory;-><init>()V
|
|
|
|
invoke-direct {p1, p0, v0}, Landroidx/lifecycle/ViewModelProvider;-><init>(Landroidx/lifecycle/ViewModelStoreOwner;Landroidx/lifecycle/ViewModelProvider$Factory;)V
|
|
|
|
const-class v0, Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel;
|
|
|
|
invoke-virtual {p1, v0}, Landroidx/lifecycle/ViewModelProvider;->get(Ljava/lang/Class;)Landroidx/lifecycle/ViewModel;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "ViewModelProvider(\n \u2026torViewModel::class.java)"
|
|
|
|
invoke-static {p1, v0}, Li0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast p1, Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel;
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->viewModel:Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onViewBound(Landroid/view/View;)V
|
|
.locals 1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-super {p0, p1}, Lcom/discord/app/AppFragment;->onViewBound(Landroid/view/View;)V
|
|
|
|
sget-object v0, Lcom/discord/widgets/voice/call/WidgetCallIndicator$onViewBound$1;->INSTANCE:Lcom/discord/widgets/voice/call/WidgetCallIndicator$onViewBound$1;
|
|
|
|
invoke-static {p1, v0}, Landroidx/core/view/ViewCompat;->setOnApplyWindowInsetsListener(Landroid/view/View;Landroidx/core/view/OnApplyWindowInsetsListener;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "view"
|
|
|
|
invoke-static {p1}, Li0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public onViewBoundOrOnResume()V
|
|
.locals 10
|
|
|
|
invoke-super {p0}, Lcom/discord/app/AppFragment;->onViewBoundOrOnResume()V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->callIndicatorVisibilityObserver:Lcom/discord/utilities/views/ViewVisibilityObserver;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/views/ViewVisibilityObserver;->observeIsVisible()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/call/WidgetCallIndicator;
|
|
|
|
new-instance v7, Lcom/discord/widgets/voice/call/WidgetCallIndicator$onViewBoundOrOnResume$1;
|
|
|
|
invoke-direct {v7, p0}, Lcom/discord/widgets/voice/call/WidgetCallIndicator$onViewBoundOrOnResume$1;-><init>(Lcom/discord/widgets/voice/call/WidgetCallIndicator;)V
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
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
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetCallIndicator;->viewModel:Lcom/discord/widgets/voice/call/WidgetHomeCallIndicatorViewModel;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Lf/a/b/q0;->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/call/WidgetCallIndicator;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
new-instance v7, Lcom/discord/widgets/voice/call/WidgetCallIndicator$onViewBoundOrOnResume$2;
|
|
|
|
invoke-direct {v7, p0}, Lcom/discord/widgets/voice/call/WidgetCallIndicator$onViewBoundOrOnResume$2;-><init>(Lcom/discord/widgets/voice/call/WidgetCallIndicator;)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}, Li0/n/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
throw v0
|
|
.end method
|