apkfuckery/com.discord/smali_classes2/com/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel.smali
2020-03-31 02:13:51 +02:00

1451 lines
44 KiB
Smali

.class public final Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;
.super Le/a/b/c0;
.source "WidgetGuildCallViewModel.kt"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState;,
Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$DisplayMode;,
Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$OverlayStatus;,
Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;,
Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Event;,
Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$StoreState;,
Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ParticipantTap;,
Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Factory;
}
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"Le/a/b/c0<",
"Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState;",
">;"
}
.end annotation
# instance fields
.field public allVideoParticipants:Ljava/util/List;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/List<",
"Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;",
">;"
}
.end annotation
.end field
.field public final applicationStreamingStore:Lcom/discord/stores/StoreApplicationStreaming;
.field public final backgroundThreadScheduler:Lrx/Scheduler;
.field public final clock:Lcom/discord/utilities/time/Clock;
.field public final eventSubject:Lrx/subjects/PublishSubject;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/subjects/PublishSubject<",
"Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Event;",
">;"
}
.end annotation
.end field
.field public focusedVideoParticipantId:Ljava/lang/Long;
.field public forwardVideoGridInteractionSubscription:Lrx/Subscription;
.field public lastParticipantTap:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ParticipantTap;
.field public final mediaEngineStore:Lcom/discord/stores/StoreMediaEngine;
.field public final selectedVoiceChannelStore:Lcom/discord/stores/StoreVoiceChannelSelected;
.field public final storeStateObservable:Lrx/Observable;
.annotation system Ldalvik/annotation/Signature;
value = {
"Lrx/Observable<",
"Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$StoreState;",
">;"
}
.end annotation
.end field
.field public final userSettingsStore:Lcom/discord/stores/StoreUserSettings;
.field public final videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
# direct methods
.method public constructor <init>(Lrx/Observable;Lcom/discord/stores/StoreVoiceChannelSelected;Lcom/discord/stores/StoreUserSettings;Lcom/discord/stores/StoreApplicationStreaming;Lcom/discord/stores/StoreMediaEngine;Lcom/discord/utilities/time/Clock;Lrx/Scheduler;)V
.locals 18
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lrx/Observable<",
"Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$StoreState;",
">;",
"Lcom/discord/stores/StoreVoiceChannelSelected;",
"Lcom/discord/stores/StoreUserSettings;",
"Lcom/discord/stores/StoreApplicationStreaming;",
"Lcom/discord/stores/StoreMediaEngine;",
"Lcom/discord/utilities/time/Clock;",
"Lrx/Scheduler;",
")V"
}
.end annotation
move-object/from16 v0, p0
move-object/from16 v1, p1
move-object/from16 v2, p2
move-object/from16 v3, p3
move-object/from16 v4, p4
move-object/from16 v5, p5
move-object/from16 v6, p6
move-object/from16 v7, p7
const/4 v8, 0x0
if-eqz v1, :cond_6
if-eqz v2, :cond_5
if-eqz v3, :cond_4
if-eqz v4, :cond_3
if-eqz v5, :cond_2
if-eqz v6, :cond_1
if-eqz v7, :cond_0
sget-object v9, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Uninitialized;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Uninitialized;
invoke-direct {v0, v9}, Le/a/b/c0;-><init>(Ljava/lang/Object;)V
iput-object v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->storeStateObservable:Lrx/Observable;
iput-object v2, v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->selectedVoiceChannelStore:Lcom/discord/stores/StoreVoiceChannelSelected;
iput-object v3, v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->userSettingsStore:Lcom/discord/stores/StoreUserSettings;
iput-object v4, v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->applicationStreamingStore:Lcom/discord/stores/StoreApplicationStreaming;
iput-object v5, v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->mediaEngineStore:Lcom/discord/stores/StoreMediaEngine;
iput-object v6, v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->clock:Lcom/discord/utilities/time/Clock;
iput-object v7, v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->backgroundThreadScheduler:Lrx/Scheduler;
invoke-static {}, Lrx/subjects/PublishSubject;->o()Lrx/subjects/PublishSubject;
move-result-object v1
iput-object v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->eventSubject:Lrx/subjects/PublishSubject;
new-instance v1, Lcom/discord/utilities/video/VideoPlayerIdleDetector;
const-wide/16 v10, 0x0
const/4 v12, 0x0
const/4 v13, 0x0
new-instance v14, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$videoPlayerIdleDetector$1;
invoke-direct {v14, v0}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$videoPlayerIdleDetector$1;-><init>(Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;)V
const/4 v15, 0x7
const/16 v16, 0x0
move-object v9, v1
invoke-direct/range {v9 .. v16}, Lcom/discord/utilities/video/VideoPlayerIdleDetector;-><init>(JLrx/Scheduler;Lrx/Scheduler;Lkotlin/jvm/functions/Function1;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
iput-object v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
sget-object v1, Ly/q/o;->d:Ly/q/o;
iput-object v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->allVideoParticipants:Ljava/util/List;
iget-object v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->storeStateObservable:Lrx/Observable;
invoke-static {v1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable;
move-result-object v1
const/4 v2, 0x2
invoke-static {v1, v0, v8, v2, v8}, 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 v9
const-class v10, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;
const/4 v11, 0x0
const/4 v12, 0x0
const/4 v13, 0x0
const/4 v14, 0x0
new-instance v15, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$1;
invoke-direct {v15, v0}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$1;-><init>(Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;)V
const/16 v16, 0x1e
const/16 v17, 0x0
invoke-static/range {v9 .. v17}, 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 v1, "backgroundThreadScheduler"
invoke-static {v1}, Ly/u/b/j;->a(Ljava/lang/String;)V
throw v8
:cond_1
const-string v1, "clock"
invoke-static {v1}, Ly/u/b/j;->a(Ljava/lang/String;)V
throw v8
:cond_2
const-string v1, "mediaEngineStore"
invoke-static {v1}, Ly/u/b/j;->a(Ljava/lang/String;)V
throw v8
:cond_3
const-string v1, "applicationStreamingStore"
invoke-static {v1}, Ly/u/b/j;->a(Ljava/lang/String;)V
throw v8
:cond_4
const-string v1, "userSettingsStore"
invoke-static {v1}, Ly/u/b/j;->a(Ljava/lang/String;)V
throw v8
:cond_5
const-string v1, "selectedVoiceChannelStore"
invoke-static {v1}, Ly/u/b/j;->a(Ljava/lang/String;)V
throw v8
:cond_6
const-string v1, "storeStateObservable"
invoke-static {v1}, Ly/u/b/j;->a(Ljava/lang/String;)V
throw v8
.end method
.method public synthetic constructor <init>(Lrx/Observable;Lcom/discord/stores/StoreVoiceChannelSelected;Lcom/discord/stores/StoreUserSettings;Lcom/discord/stores/StoreApplicationStreaming;Lcom/discord/stores/StoreMediaEngine;Lcom/discord/utilities/time/Clock;Lrx/Scheduler;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
.locals 10
and-int/lit8 v0, p8, 0x40
if-eqz v0, :cond_0
invoke-static {}, Lg0/q/a;->b()Lrx/Scheduler;
move-result-object v0
const-string v1, "Schedulers.computation()"
invoke-static {v0, v1}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
move-object v9, v0
goto :goto_0
:cond_0
move-object/from16 v9, p7
:goto_0
move-object v2, p0
move-object v3, p1
move-object v4, p2
move-object v5, p3
move-object v6, p4
move-object v7, p5
move-object/from16 v8, p6
invoke-direct/range {v2 .. v9}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;-><init>(Lrx/Observable;Lcom/discord/stores/StoreVoiceChannelSelected;Lcom/discord/stores/StoreUserSettings;Lcom/discord/stores/StoreApplicationStreaming;Lcom/discord/stores/StoreMediaEngine;Lcom/discord/utilities/time/Clock;Lrx/Scheduler;)V
return-void
.end method
.method public static final synthetic access$getVideoPlayerIdleDetector$p(Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;)Lcom/discord/utilities/video/VideoPlayerIdleDetector;
.locals 0
iget-object p0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
return-object p0
.end method
.method public static final synthetic access$onIdleStateChanged(Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;Z)V
.locals 0
invoke-direct {p0, p1}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->onIdleStateChanged(Z)V
return-void
.end method
.method private final cancelTapForwardingJob()V
.locals 1
.annotation build Landroidx/annotation/UiThread;
.end annotation
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->forwardVideoGridInteractionSubscription:Lrx/Subscription;
if-eqz v0, :cond_0
invoke-interface {v0}, Lrx/Subscription;->unsubscribe()V
:cond_0
const/4 v0, 0x0
iput-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->forwardVideoGridInteractionSubscription:Lrx/Subscription;
return-void
.end method
.method private final clearFocusedVideoParticipant()V
.locals 12
.annotation build Landroidx/annotation/UiThread;
.end annotation
invoke-virtual {p0}, Le/a/b/c0;->getViewState()Ljava/lang/Object;
move-result-object v0
instance-of v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;
const/4 v2, 0x0
if-nez v1, :cond_0
move-object v0, v2
:cond_0
move-object v3, v0
check-cast v3, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;
if-eqz v3, :cond_1
iput-object v2, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->focusedVideoParticipantId:Ljava/lang/Long;
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->computeVisibleVideoParticipants()Ljava/util/List;
move-result-object v6
const/4 v4, 0x0
const/4 v5, 0x0
const/4 v7, 0x0
const/4 v8, 0x0
const/4 v9, 0x0
const/16 v10, 0x3b
const/4 v11, 0x0
invoke-static/range {v3 .. v11}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;->copy$default(Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;Lcom/discord/widgets/voice/model/CallModel;Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$OverlayStatus;Ljava/util/List;ZZLcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;ILjava/lang/Object;)Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;
move-result-object v0
invoke-virtual {p0, v0}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
:cond_1
return-void
.end method
.method private final computeVisibleVideoParticipants()Ljava/util/List;
.locals 8
.annotation build Landroidx/annotation/UiThread;
.end annotation
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Ljava/util/List<",
"Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;",
">;"
}
.end annotation
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->focusedVideoParticipantId:Ljava/lang/Long;
if-nez v0, :cond_0
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->allVideoParticipants:Ljava/util/List;
goto :goto_3
:cond_0
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->allVideoParticipants:Ljava/util/List;
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v0
:cond_1
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v1
const/4 v2, 0x0
if-eqz v1, :cond_4
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v1
move-object v3, v1
check-cast v3, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
invoke-virtual {v3}, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;->b()Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
move-result-object v3
invoke-virtual {v3}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->getUser()Lcom/discord/models/domain/ModelUser;
move-result-object v3
invoke-virtual {v3}, Lcom/discord/models/domain/ModelUser;->getId()J
move-result-wide v3
iget-object v5, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->focusedVideoParticipantId:Ljava/lang/Long;
if-nez v5, :cond_2
goto :goto_0
:cond_2
invoke-virtual {v5}, Ljava/lang/Long;->longValue()J
move-result-wide v5
cmp-long v7, v3, v5
if-nez v7, :cond_3
const/4 v3, 0x1
goto :goto_1
:cond_3
:goto_0
const/4 v3, 0x0
:goto_1
if-eqz v3, :cond_1
goto :goto_2
:cond_4
move-object v1, v2
:goto_2
check-cast v1, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
if-nez v1, :cond_5
iput-object v2, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->focusedVideoParticipantId:Ljava/lang/Long;
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->allVideoParticipants:Ljava/util/List;
goto :goto_3
:cond_5
invoke-static {v1}, Le/k/a/c/e/p/g;->listOf(Ljava/lang/Object;)Ljava/util/List;
move-result-object v0
:goto_3
return-object v0
.end method
.method private final focusVideoParticipant(J)V
.locals 10
.annotation build Landroidx/annotation/UiThread;
.end annotation
invoke-virtual {p0}, Le/a/b/c0;->getViewState()Ljava/lang/Object;
move-result-object v0
instance-of v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;
if-nez v1, :cond_0
const/4 v0, 0x0
:cond_0
move-object v1, v0
check-cast v1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;
if-eqz v1, :cond_1
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
move-result-object p1
iput-object p1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->focusedVideoParticipantId:Ljava/lang/Long;
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->computeVisibleVideoParticipants()Ljava/util/List;
move-result-object v4
const/4 v2, 0x0
const/4 v3, 0x0
const/4 v5, 0x0
const/4 v6, 0x0
const/4 v7, 0x0
const/16 v8, 0x3b
const/4 v9, 0x0
invoke-static/range {v1 .. v9}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;->copy$default(Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;Lcom/discord/widgets/voice/model/CallModel;Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$OverlayStatus;Ljava/util/List;ZZLcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;ILjava/lang/Object;)Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;
move-result-object p1
invoke-virtual {p0, p1}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
:cond_1
return-void
.end method
.method private final onIdleStateChanged(Z)V
.locals 10
.annotation build Landroidx/annotation/UiThread;
.end annotation
invoke-virtual {p0}, Le/a/b/c0;->getViewState()Ljava/lang/Object;
move-result-object v0
instance-of v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;
if-nez v1, :cond_0
const/4 v0, 0x0
:cond_0
move-object v1, v0
check-cast v1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;
if-eqz v1, :cond_2
if-eqz p1, :cond_1
invoke-virtual {v1}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;->isShowingControls()Z
move-result v0
if-eqz v0, :cond_1
const/4 v2, 0x0
const/4 v3, 0x0
const/4 v4, 0x0
const/4 v5, 0x0
const/4 v6, 0x0
const/4 v7, 0x0
const/16 v8, 0x37
const/4 v9, 0x0
invoke-static/range {v1 .. v9}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;->copy$default(Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;Lcom/discord/widgets/voice/model/CallModel;Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$OverlayStatus;Ljava/util/List;ZZLcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;ILjava/lang/Object;)Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;
move-result-object p1
invoke-virtual {p0, p1}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
goto :goto_0
:cond_1
if-nez p1, :cond_2
invoke-virtual {v1}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;->isShowingControls()Z
move-result p1
if-nez p1, :cond_2
const/4 v2, 0x0
const/4 v3, 0x0
const/4 v4, 0x0
const/4 v5, 0x1
const/4 v6, 0x0
const/4 v7, 0x0
const/16 v8, 0x37
const/4 v9, 0x0
invoke-static/range {v1 .. v9}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;->copy$default(Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;Lcom/discord/widgets/voice/model/CallModel;Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$OverlayStatus;Ljava/util/List;ZZLcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;ILjava/lang/Object;)Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;
move-result-object p1
invoke-virtual {p0, p1}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
:cond_2
:goto_0
return-void
.end method
.method private final startTapForwardingJob()V
.locals 4
.annotation build Landroidx/annotation/UiThread;
.end annotation
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->cancelTapForwardingJob()V
sget-object v0, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
iget-object v1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->backgroundThreadScheduler:Lrx/Scheduler;
const-wide/16 v2, 0x1f4
invoke-static {v2, v3, v0, v1}, Lrx/Observable;->e(JLjava/util/concurrent/TimeUnit;Lrx/Scheduler;)Lrx/Observable;
move-result-object v0
const-string v1, "Observable\n .time\u2026ackgroundThreadScheduler)"
invoke-static {v0, v1}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
const/4 v1, 0x0
const/4 v2, 0x2
invoke-static {v0, p0, v1, v2, v1}, 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 v0
new-instance v1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$startTapForwardingJob$1;
invoke-direct {v1, p0}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$startTapForwardingJob$1;-><init>(Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;)V
invoke-virtual {v0, v1}, Lrx/Observable;->c(Lrx/functions/Action1;)Lrx/Subscription;
move-result-object v0
iput-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->forwardVideoGridInteractionSubscription:Lrx/Subscription;
return-void
.end method
# virtual methods
.method public final connectToVoice(J)V
.locals 2
.annotation build Landroidx/annotation/UiThread;
.end annotation
invoke-virtual {p0}, Le/a/b/c0;->getViewState()Ljava/lang/Object;
move-result-object v0
instance-of v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;
if-nez v1, :cond_0
const/4 v0, 0x0
:cond_0
check-cast v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;
if-eqz v0, :cond_2
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;->getOverlayStatus()Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$OverlayStatus;
move-result-object v0
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$OverlayStatus;->INVISIBLE:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$OverlayStatus;
if-ne v0, v1, :cond_1
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->eventSubject:Lrx/subjects/PublishSubject;
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Event$ShowOverlayNux;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Event$ShowOverlayNux;
invoke-virtual {v0, v1}, Lrx/subjects/PublishSubject;->onNext(Ljava/lang/Object;)V
:cond_1
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->selectedVoiceChannelStore:Lcom/discord/stores/StoreVoiceChannelSelected;
invoke-virtual {v0, p1, p2}, Lcom/discord/stores/StoreVoiceChannelSelected;->set(J)V
:cond_2
return-void
.end method
.method public final disconnect()V
.locals 1
.annotation build Landroidx/annotation/UiThread;
.end annotation
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->selectedVoiceChannelStore:Lcom/discord/stores/StoreVoiceChannelSelected;
invoke-virtual {v0}, Lcom/discord/stores/StoreVoiceChannelSelected;->clear()V
return-void
.end method
.method public final handleStoreState(Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$StoreState;)V
.locals 12
.annotation build Landroidx/annotation/UiThread;
.end annotation
const/4 v0, 0x0
if-eqz p1, :cond_17
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$StoreState$Invalid;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$StoreState$Invalid;
invoke-static {p1, v1}, Ly/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v1
if-eqz v1, :cond_0
sget-object p1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Invalid;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Invalid;
invoke-virtual {p0, p1}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
goto/16 :goto_12
:cond_0
instance-of v1, p1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$StoreState$Valid;
if-eqz v1, :cond_16
check-cast p1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$StoreState$Valid;
invoke-virtual {p1}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$StoreState$Valid;->isInSamsungExperiment()Z
move-result v1
if-nez v1, :cond_1
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$OverlayStatus;->INVISIBLE:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$OverlayStatus;
:goto_0
move-object v4, v1
goto :goto_1
:cond_1
iget-object v1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->userSettingsStore:Lcom/discord/stores/StoreUserSettings;
invoke-virtual {v1}, Lcom/discord/stores/StoreUserSettings;->getMobileOverlay()Z
move-result v1
if-eqz v1, :cond_2
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$OverlayStatus;->ENABLED:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$OverlayStatus;
goto :goto_0
:cond_2
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$OverlayStatus;->DISABLED:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$OverlayStatus;
goto :goto_0
:goto_1
invoke-virtual {p1}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
move-result-object v1
invoke-virtual {v1}, Lcom/discord/widgets/voice/model/CallModel;->getSelectedVideoDevice()Lco/discord/media_engine/VideoInputDeviceDescription;
move-result-object v1
invoke-virtual {p1}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$StoreState$Valid;->getGuildVideoEligibility()Lcom/discord/widgets/voice/fullscreen/GuildVideoEligibility;
move-result-object v2
invoke-virtual {v2}, Lcom/discord/widgets/voice/fullscreen/GuildVideoEligibility;->getCanSpectate()Z
move-result v2
const/4 v3, 0x0
const/4 v5, 0x1
if-nez v2, :cond_4
if-eqz v1, :cond_3
goto :goto_2
:cond_3
const/4 v2, 0x0
goto :goto_3
:cond_4
:goto_2
const/4 v2, 0x1
:goto_3
if-eqz v2, :cond_8
invoke-virtual {p1}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
move-result-object v2
invoke-virtual {v2}, Lcom/discord/widgets/voice/model/CallModel;->getParticipants()Ljava/util/Map;
move-result-object v2
invoke-interface {v2}, Ljava/util/Map;->values()Ljava/util/Collection;
move-result-object v2
new-instance v6, Ljava/util/ArrayList;
invoke-direct {v6}, Ljava/util/ArrayList;-><init>()V
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v2
:cond_5
:goto_4
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v7
if-eqz v7, :cond_7
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v7
move-object v8, v7
check-cast v8, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
invoke-virtual {v8}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->getCallStreamId()Ljava/lang/Integer;
move-result-object v8
if-eqz v8, :cond_6
const/4 v8, 0x1
goto :goto_5
:cond_6
const/4 v8, 0x0
:goto_5
if-eqz v8, :cond_5
invoke-interface {v6, v7}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
goto :goto_4
:cond_7
new-instance v2, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$handleStoreState$$inlined$sortedBy$1;
invoke-direct {v2}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$handleStoreState$$inlined$sortedBy$1;-><init>()V
invoke-static {v6, v2}, Ly/q/l;->sortedWith(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
move-result-object v2
new-instance v6, Ljava/util/ArrayList;
const/16 v7, 0xa
invoke-static {v2, v7}, Le/k/a/c/e/p/g;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
move-result v7
invoke-direct {v6, v7}, Ljava/util/ArrayList;-><init>(I)V
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v2
:goto_6
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v7
if-eqz v7, :cond_9
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v7
check-cast v7, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
new-instance v8, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
invoke-virtual {v7}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isMe()Z
move-result v9
sget-object v10, Lorg/webrtc/RendererCommon$ScalingType;->SCALE_ASPECT_BALANCED:Lorg/webrtc/RendererCommon$ScalingType;
sget-object v11, Lorg/webrtc/RendererCommon$ScalingType;->SCALE_ASPECT_FIT:Lorg/webrtc/RendererCommon$ScalingType;
invoke-direct {v8, v7, v9, v10, v11}, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;-><init>(Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;ZLorg/webrtc/RendererCommon$ScalingType;Lorg/webrtc/RendererCommon$ScalingType;)V
invoke-interface {v6, v8}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
goto :goto_6
:cond_8
sget-object v6, Ly/q/o;->d:Ly/q/o;
:cond_9
iput-object v6, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->allVideoParticipants:Ljava/util/List;
iget-object v2, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->allVideoParticipants:Ljava/util/List;
invoke-interface {v2}, Ljava/util/Collection;->isEmpty()Z
move-result v2
xor-int/2addr v2, v5
if-eqz v2, :cond_a
iget-object v6, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
invoke-virtual {v6}, Lcom/discord/utilities/video/VideoPlayerIdleDetector;->beginIdleDetection()V
goto :goto_7
:cond_a
iget-object v6, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
invoke-virtual {v6}, Lcom/discord/utilities/video/VideoPlayerIdleDetector;->endIdleDetection()V
:goto_7
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->computeVisibleVideoParticipants()Ljava/util/List;
move-result-object v6
invoke-virtual {p0}, Le/a/b/c0;->getViewState()Ljava/lang/Object;
move-result-object v7
instance-of v8, v7, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;
if-nez v8, :cond_b
goto :goto_8
:cond_b
move-object v0, v7
:goto_8
check-cast v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;
if-eqz v0, :cond_c
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;->isShowingControls()Z
move-result v0
goto :goto_9
:cond_c
const/4 v0, 0x1
:goto_9
if-nez v0, :cond_e
if-nez v2, :cond_d
goto :goto_a
:cond_d
const/4 v0, 0x0
goto :goto_b
:cond_e
:goto_a
const/4 v0, 0x1
:goto_b
invoke-virtual {p1}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$StoreState$Valid;->getGuildVideoEligibility()Lcom/discord/widgets/voice/fullscreen/GuildVideoEligibility;
move-result-object v2
sget-object v7, Lcom/discord/widgets/voice/fullscreen/GuildVideoEligibility;->SPECTATE_AND_BROADCAST:Lcom/discord/widgets/voice/fullscreen/GuildVideoEligibility;
if-eq v2, v7, :cond_10
if-eqz v1, :cond_f
goto :goto_c
:cond_f
const/4 v2, 0x0
goto :goto_d
:cond_10
:goto_c
const/4 v2, 0x1
:goto_d
invoke-virtual {p1}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
move-result-object v7
invoke-virtual {v7}, Lcom/discord/widgets/voice/model/CallModel;->isConnected()Z
move-result v7
if-nez v7, :cond_11
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;->CAMERA_DISABLED:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;
:goto_e
move-object v8, v1
goto :goto_f
:cond_11
if-eqz v2, :cond_12
if-eqz v1, :cond_12
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;->CAMERA_ON:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;
goto :goto_e
:cond_12
if-eqz v2, :cond_13
if-nez v1, :cond_13
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;->CAMERA_OFF:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;
goto :goto_e
:cond_13
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;->CAMERA_DISABLED:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;
goto :goto_e
:goto_f
invoke-virtual {p1}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
move-result-object v1
invoke-virtual {v1}, Lcom/discord/widgets/voice/model/CallModel;->getVideoDevices()Ljava/util/List;
move-result-object v1
invoke-interface {v1}, Ljava/util/List;->size()I
move-result v1
const/4 v2, 0x2
if-lt v1, v2, :cond_14
const/4 v1, 0x1
goto :goto_10
:cond_14
const/4 v1, 0x0
:goto_10
if-eqz v1, :cond_15
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;->CAMERA_ON:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;
if-ne v8, v1, :cond_15
const/4 v7, 0x1
goto :goto_11
:cond_15
const/4 v7, 0x0
:goto_11
new-instance v1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;
invoke-virtual {p1}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
move-result-object v3
move-object v2, v1
move-object v5, v6
move v6, v0
invoke-direct/range {v2 .. v8}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;-><init>(Lcom/discord/widgets/voice/model/CallModel;Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$OverlayStatus;Ljava/util/List;ZZLcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;)V
invoke-virtual {p0, v1}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
:cond_16
:goto_12
return-void
:cond_17
const-string p1, "storeState"
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
throw v0
.end method
.method public final observeEvents()Lrx/Observable;
.locals 2
.annotation system Ldalvik/annotation/Signature;
value = {
"()",
"Lrx/Observable<",
"Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$Event;",
">;"
}
.end annotation
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->eventSubject:Lrx/subjects/PublishSubject;
const-string v1, "eventSubject"
invoke-static {v0, v1}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
return-object v0
.end method
.method public onCleared()V
.locals 1
.annotation build Landroidx/annotation/UiThread;
.end annotation
invoke-super {p0}, Le/a/b/c0;->onCleared()V
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->videoPlayerIdleDetector:Lcom/discord/utilities/video/VideoPlayerIdleDetector;
invoke-virtual {v0}, Lcom/discord/utilities/video/VideoPlayerIdleDetector;->dispose()V
return-void
.end method
.method public final onGridParticipantTapped(J)V
.locals 5
.annotation build Landroidx/annotation/UiThread;
.end annotation
new-instance v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ParticipantTap;
iget-object v1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->clock:Lcom/discord/utilities/time/Clock;
invoke-interface {v1}, Lcom/discord/utilities/time/Clock;->currentTimeMillis()J
move-result-wide v1
invoke-direct {v0, p1, p2, v1, v2}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ParticipantTap;-><init>(JJ)V
iget-object v1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->lastParticipantTap:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ParticipantTap;
iput-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->lastParticipantTap:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ParticipantTap;
if-eqz v1, :cond_5
invoke-virtual {v1}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ParticipantTap;->getUserId()J
move-result-wide v2
cmp-long v4, v2, p1
if-eqz v4, :cond_0
goto :goto_4
:cond_0
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ParticipantTap;->getTimestamp()J
move-result-wide v2
invoke-virtual {v1}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ParticipantTap;->getTimestamp()J
move-result-wide v0
sub-long/2addr v2, v0
const-wide/16 v0, 0x1f4
cmp-long v4, v2, v0
if-gtz v4, :cond_1
const/4 v0, 0x1
goto :goto_0
:cond_1
const/4 v0, 0x0
:goto_0
if-eqz v0, :cond_4
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->focusedVideoParticipantId:Ljava/lang/Long;
if-nez v0, :cond_2
goto :goto_1
:cond_2
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
move-result-wide v0
cmp-long v2, v0, p1
if-eqz v2, :cond_3
:goto_1
invoke-direct {p0, p1, p2}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->focusVideoParticipant(J)V
goto :goto_2
:cond_3
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->clearFocusedVideoParticipant()V
:goto_2
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->cancelTapForwardingJob()V
const/4 p1, 0x0
iput-object p1, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->lastParticipantTap:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ParticipantTap;
goto :goto_3
:cond_4
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->startTapForwardingJob()V
:goto_3
return-void
:cond_5
:goto_4
invoke-direct {p0}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->startTapForwardingJob()V
return-void
.end method
.method public final switchCameraInputPressed()V
.locals 3
.annotation build Landroidx/annotation/UiThread;
.end annotation
invoke-virtual {p0}, Le/a/b/c0;->getViewState()Ljava/lang/Object;
move-result-object v0
instance-of v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;
if-nez v1, :cond_0
const/4 v0, 0x0
:cond_0
check-cast v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;
if-eqz v0, :cond_4
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;->getCameraState()Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;
move-result-object v1
sget-object v2, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;->CAMERA_DISABLED:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;
if-ne v1, v2, :cond_1
return-void
:cond_1
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;->getCameraState()Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;
move-result-object v0
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;->CAMERA_ON:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;
if-ne v0, v1, :cond_2
const/4 v0, 0x1
goto :goto_0
:cond_2
const/4 v0, 0x0
:goto_0
if-nez v0, :cond_3
return-void
:cond_3
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->mediaEngineStore:Lcom/discord/stores/StoreMediaEngine;
invoke-virtual {v0}, Lcom/discord/stores/StoreMediaEngine;->cycleVideoInputDevice()V
:cond_4
return-void
.end method
.method public final targetStream(Ljava/lang/String;)V
.locals 1
.annotation build Landroidx/annotation/UiThread;
.end annotation
if-eqz p1, :cond_0
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->applicationStreamingStore:Lcom/discord/stores/StoreApplicationStreaming;
invoke-virtual {v0, p1}, Lcom/discord/stores/StoreApplicationStreaming;->targetStream(Ljava/lang/String;)V
return-void
:cond_0
const-string p1, "streamKey"
invoke-static {p1}, Ly/u/b/j;->a(Ljava/lang/String;)V
const/4 p1, 0x0
throw p1
.end method
.method public final toggleCameraPressed()V
.locals 4
.annotation build Landroidx/annotation/UiThread;
.end annotation
invoke-virtual {p0}, Le/a/b/c0;->getViewState()Ljava/lang/Object;
move-result-object v0
instance-of v1, v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;
const/4 v2, 0x0
if-nez v1, :cond_0
move-object v0, v2
:cond_0
check-cast v0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;
if-eqz v0, :cond_4
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;->getCameraState()Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;
move-result-object v1
sget-object v3, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;->CAMERA_DISABLED:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;
if-ne v1, v3, :cond_1
return-void
:cond_1
invoke-virtual {v0}, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$ViewState$Valid;->getCameraState()Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;
move-result-object v0
sget-object v1, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;->CAMERA_ON:Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel$CameraState;
const/4 v3, 0x1
if-ne v0, v1, :cond_2
const/4 v0, 0x1
goto :goto_0
:cond_2
const/4 v0, 0x0
:goto_0
if-nez v0, :cond_3
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->mediaEngineStore:Lcom/discord/stores/StoreMediaEngine;
invoke-static {v0, v2, v3, v2}, Lcom/discord/stores/StoreMediaEngine;->selectDefaultVideoDevice$default(Lcom/discord/stores/StoreMediaEngine;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
goto :goto_1
:cond_3
iget-object v0, p0, Lcom/discord/widgets/voice/fullscreen/WidgetGuildCallViewModel;->mediaEngineStore:Lcom/discord/stores/StoreMediaEngine;
invoke-virtual {v0, v2}, Lcom/discord/stores/StoreMediaEngine;->selectVideoInputDevice(Ljava/lang/String;)V
:cond_4
:goto_1
return-void
.end method