2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel;
|
2020-07-25 00:57:58 +00:00
|
|
|
.super Lf/a/b/o0;
|
2020-05-17 12:40:10 +00:00
|
|
|
.source "WidgetGuildCallOnboardingSheetViewModel.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$ViewState;,
|
|
|
|
Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$StoreState;,
|
|
|
|
Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$Event;,
|
|
|
|
Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$Factory;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
2020-07-25 00:57:58 +00:00
|
|
|
"Lf/a/b/o0<",
|
2020-05-17 12:40:10 +00:00
|
|
|
"Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$ViewState;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final channelId:J
|
|
|
|
|
|
|
|
.field public final eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lrx/subjects/PublishSubject<",
|
|
|
|
"Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$Event;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
.end field
|
|
|
|
|
|
|
|
.field public final selectedVoiceChannelStore:Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(JLcom/discord/stores/StoreVoiceChannelSelected;Lrx/Observable;)V
|
|
|
|
.locals 10
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(J",
|
|
|
|
"Lcom/discord/stores/StoreVoiceChannelSelected;",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$StoreState;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$ViewState$Uninitialized;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$ViewState$Uninitialized;
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-direct {p0, v1}, Lf/a/b/o0;-><init>(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iput-wide p1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel;->channelId:J
|
|
|
|
|
|
|
|
iput-object p3, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel;->selectedVoiceChannelStore:Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
|
2020-08-04 06:02:43 +00:00
|
|
|
invoke-static {}, Lrx/subjects/PublishSubject;->g0()Lrx/subjects/PublishSubject;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p4}, Lrx/Observable;->q()Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string p2, "storeStateObservable\n \u2026 .distinctUntilChanged()"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const/4 p2, 0x2
|
|
|
|
|
|
|
|
invoke-static {p1, p0, v0, p2, v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui$default(Lrx/Observable;Lcom/discord/app/AppComponent;Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;ILjava/lang/Object;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const-class v2, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel;
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
new-instance v7, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$1;
|
|
|
|
|
|
|
|
invoke-direct {v7, p0}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$1;-><init>(Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel;)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 p1, "storeStateObservable"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const-string p1, "selectedVoiceChannelStore"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$handleStoreState(Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel;Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$StoreState;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel;->handleStoreState(Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$StoreState;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final handleStoreState(Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$StoreState;)V
|
|
|
|
.locals 1
|
|
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$StoreState;->getVoiceChannelJoinability()Lcom/discord/utilities/voice/VoiceChannelJoinability;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-direct {v0, p1}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$ViewState$Loaded;-><init>(Lcom/discord/utilities/voice/VoiceChannelJoinability;)V
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-virtual {p0, v0}, Lf/a/b/o0;->updateViewState(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final observeEvents()Lrx/Observable;
|
|
|
|
.locals 2
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()",
|
|
|
|
"Lrx/Observable<",
|
|
|
|
"Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$Event;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
|
|
|
|
const-string v1, "eventSubject"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final onConnectPressed()V
|
|
|
|
.locals 4
|
|
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
|
|
.end annotation
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-virtual {p0}, Lf/a/b/o0;->getViewState()Ljava/lang/Object;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
check-cast v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$ViewState$Loaded;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$ViewState$Loaded;->getJoinability()Lcom/discord/utilities/voice/VoiceChannelJoinability;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
if-eqz v0, :cond_2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v1, 0x2
|
|
|
|
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$Event$ShowGuildVideoCapacityDialog;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$Event$ShowGuildVideoCapacityDialog;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v0, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel;->selectedVoiceChannelStore:Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
|
|
|
|
iget-wide v1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel;->channelId:J
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/discord/stores/StoreVoiceChannelSelected;->set(J)Lrx/Observable;
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$Event$LaunchGuildCallScreen;
|
|
|
|
|
|
|
|
iget-wide v2, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel;->channelId:J
|
|
|
|
|
|
|
|
invoke-direct {v1, v2, v3}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallOnboardingSheetViewModel$Event$LaunchGuildCallScreen;-><init>(J)V
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iget-object v0, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_3
|
|
|
|
:goto_0
|
|
|
|
return-void
|
|
|
|
.end method
|