1826 lines
53 KiB
Smali
1826 lines
53 KiB
Smali
.class public final Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;
|
|
.super Le/a/b/c0;
|
|
.source "WidgetPrivateCallViewModel.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState;,
|
|
Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$StoreState;,
|
|
Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Event;,
|
|
Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Factory;,
|
|
Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Le/a/b/c0<",
|
|
"Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Companion:Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Companion;
|
|
|
|
.field public static final DOUBLE_TAP_THRESHOLD_MS:J = 0x3e8L
|
|
|
|
.field public static final SHOW_CHROME_INTERACTION_THRESHOLD_MILLIS:J = 0xbb8L
|
|
|
|
|
|
# instance fields
|
|
.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/call/WidgetPrivateCallViewModel$Event;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public hideChromeSubscription:Lrx/Subscription;
|
|
|
|
.field public lastTappedParticipant:Lkotlin/Pair;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/Pair<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Long;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public pttPressed:Z
|
|
|
|
.field public selectedParticipantId:Ljava/lang/Long;
|
|
|
|
.field public final storeAudioDevices:Lcom/discord/stores/StoreAudioDevices;
|
|
|
|
.field public final storeMediaEngine:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
.field public final storeStateObservable:Lrx/Observable;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$StoreState;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final storeVoiceParticipants:Lcom/discord/stores/StoreVoiceParticipants;
|
|
|
|
.field public final tappedUsers:Ljava/util/Set;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/Set<",
|
|
"Ljava/lang/Long;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final timerScheduler:Lrx/Scheduler;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->Companion:Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Companion;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lrx/Observable;Lcom/discord/stores/StoreVoiceParticipants;Lcom/discord/stores/StoreMediaEngine;Lcom/discord/stores/StoreAudioDevices;Lcom/discord/utilities/time/Clock;Lrx/Scheduler;)V
|
|
.locals 17
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$StoreState;",
|
|
">;",
|
|
"Lcom/discord/stores/StoreVoiceParticipants;",
|
|
"Lcom/discord/stores/StoreMediaEngine;",
|
|
"Lcom/discord/stores/StoreAudioDevices;",
|
|
"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
|
|
|
|
const/4 v7, 0x0
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
if-eqz v5, :cond_1
|
|
|
|
if-eqz v6, :cond_0
|
|
|
|
sget-object v8, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Uninitialized;->INSTANCE:Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Uninitialized;
|
|
|
|
invoke-direct {v0, v8}, Le/a/b/c0;-><init>(Ljava/lang/Object;)V
|
|
|
|
iput-object v1, v0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->storeStateObservable:Lrx/Observable;
|
|
|
|
iput-object v2, v0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->storeVoiceParticipants:Lcom/discord/stores/StoreVoiceParticipants;
|
|
|
|
iput-object v3, v0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->storeMediaEngine:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
iput-object v4, v0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->storeAudioDevices:Lcom/discord/stores/StoreAudioDevices;
|
|
|
|
iput-object v5, v0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->clock:Lcom/discord/utilities/time/Clock;
|
|
|
|
iput-object v6, v0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->timerScheduler:Lrx/Scheduler;
|
|
|
|
new-instance v1, Ljava/util/HashSet;
|
|
|
|
invoke-direct {v1}, Ljava/util/HashSet;-><init>()V
|
|
|
|
iput-object v1, v0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->tappedUsers:Ljava/util/Set;
|
|
|
|
invoke-static {}, Lrx/subjects/PublishSubject;->o()Lrx/subjects/PublishSubject;
|
|
|
|
move-result-object v1
|
|
|
|
iput-object v1, v0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
iget-object v1, v0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->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, v7, v2, v7}, 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 v8
|
|
|
|
const-class v9, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
const/4 v13, 0x0
|
|
|
|
new-instance v14, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$1;
|
|
|
|
invoke-direct {v14, v0}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$1;-><init>(Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;)V
|
|
|
|
const/16 v15, 0x1e
|
|
|
|
const/16 v16, 0x0
|
|
|
|
invoke-static/range {v8 .. v16}, 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, "timerScheduler"
|
|
|
|
invoke-static {v1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v7
|
|
|
|
:cond_1
|
|
const-string v1, "clock"
|
|
|
|
invoke-static {v1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v7
|
|
|
|
:cond_2
|
|
const-string v1, "storeAudioDevices"
|
|
|
|
invoke-static {v1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v7
|
|
|
|
:cond_3
|
|
const-string v1, "storeMediaEngine"
|
|
|
|
invoke-static {v1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v7
|
|
|
|
:cond_4
|
|
const-string v1, "storeVoiceParticipants"
|
|
|
|
invoke-static {v1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v7
|
|
|
|
:cond_5
|
|
const-string v1, "storeStateObservable"
|
|
|
|
invoke-static {v1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v7
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Lrx/Observable;Lcom/discord/stores/StoreVoiceParticipants;Lcom/discord/stores/StoreMediaEngine;Lcom/discord/stores/StoreAudioDevices;Lcom/discord/utilities/time/Clock;Lrx/Scheduler;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 7
|
|
|
|
and-int/lit8 p7, p7, 0x20
|
|
|
|
if-eqz p7, :cond_0
|
|
|
|
invoke-static {}, Le0/q/a;->b()Lrx/Scheduler;
|
|
|
|
move-result-object p6
|
|
|
|
const-string p7, "Schedulers.computation()"
|
|
|
|
invoke-static {p6, p7}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
:cond_0
|
|
move-object v6, p6
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p2
|
|
|
|
move-object v3, p3
|
|
|
|
move-object v4, p4
|
|
|
|
move-object v5, p5
|
|
|
|
invoke-direct/range {v0 .. v6}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;-><init>(Lrx/Observable;Lcom/discord/stores/StoreVoiceParticipants;Lcom/discord/stores/StoreMediaEngine;Lcom/discord/stores/StoreAudioDevices;Lcom/discord/utilities/time/Clock;Lrx/Scheduler;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$getHideChromeSubscription$p(Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;)Lrx/Subscription;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->hideChromeSubscription:Lrx/Subscription;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getViewState$p(Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;)Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState;
|
|
.locals 0
|
|
|
|
invoke-virtual {p0}, Le/a/b/c0;->getViewState()Ljava/lang/Object;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$handleStoreState(Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$StoreState;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->handleStoreState(Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$StoreState;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$setHideChromeSubscription$p(Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;Lrx/Subscription;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->hideChromeSubscription:Lrx/Subscription;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$updateViewState(Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState;)V
|
|
.locals 0
|
|
|
|
invoke-virtual {p0, p1}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final createCallUserListItems(Lcom/discord/widgets/voice/model/CallModel;Ljava/util/Set;)Ljava/util/List;
|
|
.locals 5
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/widgets/voice/model/CallModel;",
|
|
"Ljava/util/Set<",
|
|
"Ljava/lang/Long;",
|
|
">;)",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/widgets/voice/call/PrivateCallUsersAdapter$CallUserItem;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/voice/model/CallModel;->getParticipants()Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_0
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
move-object v3, v2
|
|
|
|
check-cast v3, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
invoke-direct {p0, p1, v3}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->shouldIncludeParticipant(Lcom/discord/widgets/voice/model/CallModel;Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
new-instance p1, Ljava/util/ArrayList;
|
|
|
|
const/16 v0, 0xa
|
|
|
|
invoke-static {v1, v0}, Le/k/a/c/e/p/g;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
move-result v0
|
|
|
|
invoke-direct {p1, v0}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_1
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
new-instance v2, Lcom/discord/widgets/voice/call/PrivateCallUsersAdapter$CallUserItem;
|
|
|
|
invoke-virtual {v1}, 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
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {p2, v3}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v3
|
|
|
|
invoke-direct {v2, v1, v3}, Lcom/discord/widgets/voice/call/PrivateCallUsersAdapter$CallUserItem;-><init>(Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;Z)V
|
|
|
|
invoke-interface {p1, v2}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private final handleStoreState(Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$StoreState;)V
|
|
.locals 20
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
invoke-virtual/range {p0 .. p0}, Le/a/b/c0;->getViewState()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
instance-of v2, v1, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
:cond_0
|
|
check-cast v1, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$StoreState;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v5
|
|
|
|
if-eqz v5, :cond_1f
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$StoreState;->getSelectedParticipantId()Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$StoreState;->getSelectedVideoInputDevice()Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
move-result-object v4
|
|
|
|
iput-object v2, v0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->selectedParticipantId:Ljava/lang/Long;
|
|
|
|
iget-object v6, v0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->tappedUsers:Ljava/util/Set;
|
|
|
|
invoke-direct {v0, v5, v6}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->createCallUserListItems(Lcom/discord/widgets/voice/model/CallModel;Ljava/util/Set;)Ljava/util/List;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v5}, Lcom/discord/widgets/voice/model/CallModel;->isVideoCall()Z
|
|
|
|
move-result v7
|
|
|
|
const/4 v8, 0x1
|
|
|
|
if-eqz v7, :cond_1
|
|
|
|
invoke-virtual {v5}, Lcom/discord/widgets/voice/model/CallModel;->isConnected()Z
|
|
|
|
move-result v7
|
|
|
|
if-eqz v7, :cond_1
|
|
|
|
const/4 v7, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v7, 0x0
|
|
|
|
:goto_0
|
|
invoke-virtual {v5}, Lcom/discord/widgets/voice/model/CallModel;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object v10
|
|
|
|
invoke-virtual {v10}, Lcom/discord/models/domain/ModelChannel;->isMultiUserDM()Z
|
|
|
|
move-result v10
|
|
|
|
invoke-virtual {v5}, Lcom/discord/widgets/voice/model/CallModel;->getParticipants()Ljava/util/Map;
|
|
|
|
move-result-object v11
|
|
|
|
invoke-interface {v11, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v11
|
|
|
|
check-cast v11, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
if-eqz v11, :cond_2
|
|
|
|
invoke-virtual {v11}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isConnected()Z
|
|
|
|
move-result v11
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/4 v11, 0x0
|
|
|
|
:goto_1
|
|
if-eqz v4, :cond_3
|
|
|
|
invoke-virtual {v4}, Lco/discord/media_engine/VideoInputDeviceDescription;->getFacing()Lco/discord/media_engine/VideoInputDeviceFacing;
|
|
|
|
move-result-object v4
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
const/4 v4, 0x0
|
|
|
|
:goto_2
|
|
sget-object v12, Lco/discord/media_engine/VideoInputDeviceFacing;->Front:Lco/discord/media_engine/VideoInputDeviceFacing;
|
|
|
|
if-ne v4, v12, :cond_4
|
|
|
|
const/4 v4, 0x1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_4
|
|
const/4 v4, 0x0
|
|
|
|
:goto_3
|
|
if-eqz v7, :cond_d
|
|
|
|
invoke-virtual {v5}, Lcom/discord/widgets/voice/model/CallModel;->getParticipants()Ljava/util/Map;
|
|
|
|
move-result-object v12
|
|
|
|
invoke-interface {v12}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
move-result-object v12
|
|
|
|
new-instance v13, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v13}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
invoke-interface {v12}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v12
|
|
|
|
:cond_5
|
|
:goto_4
|
|
invoke-interface {v12}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v14
|
|
|
|
if-eqz v14, :cond_9
|
|
|
|
invoke-interface {v12}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v14
|
|
|
|
move-object v15, v14
|
|
|
|
check-cast v15, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
if-eqz v11, :cond_8
|
|
|
|
invoke-virtual {v15}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->getUser()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v15
|
|
|
|
invoke-virtual {v15}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v15
|
|
|
|
if-nez v2, :cond_6
|
|
|
|
goto :goto_5
|
|
|
|
:cond_6
|
|
invoke-virtual {v2}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v17
|
|
|
|
cmp-long v19, v15, v17
|
|
|
|
if-nez v19, :cond_7
|
|
|
|
const/4 v15, 0x1
|
|
|
|
goto :goto_6
|
|
|
|
:cond_7
|
|
:goto_5
|
|
const/4 v15, 0x0
|
|
|
|
goto :goto_6
|
|
|
|
:cond_8
|
|
invoke-direct {v0, v5, v15}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->shouldIncludeParticipant(Lcom/discord/widgets/voice/model/CallModel;Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;)Z
|
|
|
|
move-result v15
|
|
|
|
:goto_6
|
|
if-eqz v15, :cond_5
|
|
|
|
invoke-interface {v13, v14}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_4
|
|
|
|
:cond_9
|
|
new-instance v12, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$handleStoreState$$inlined$sortedBy$1;
|
|
|
|
invoke-direct {v12}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$handleStoreState$$inlined$sortedBy$1;-><init>()V
|
|
|
|
invoke-static {v13, v12}, Lw/q/l;->sortedWith(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
|
|
|
|
move-result-object v12
|
|
|
|
invoke-interface {v12}, Ljava/util/List;->size()I
|
|
|
|
move-result v13
|
|
|
|
if-ne v13, v8, :cond_a
|
|
|
|
sget-object v13, Lorg/webrtc/RendererCommon$ScalingType;->SCALE_ASPECT_FIT:Lorg/webrtc/RendererCommon$ScalingType;
|
|
|
|
goto :goto_7
|
|
|
|
:cond_a
|
|
sget-object v13, Lorg/webrtc/RendererCommon$ScalingType;->SCALE_ASPECT_BALANCED:Lorg/webrtc/RendererCommon$ScalingType;
|
|
|
|
:goto_7
|
|
new-instance v14, Ljava/util/ArrayList;
|
|
|
|
const/16 v15, 0xa
|
|
|
|
invoke-static {v12, v15}, Le/k/a/c/e/p/g;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
move-result v15
|
|
|
|
invoke-direct {v14, v15}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
invoke-interface {v12}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v12
|
|
|
|
:goto_8
|
|
invoke-interface {v12}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v15
|
|
|
|
if-eqz v15, :cond_c
|
|
|
|
invoke-interface {v12}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v15
|
|
|
|
check-cast v15, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
new-instance v3, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
|
|
invoke-virtual {v15}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isMe()Z
|
|
|
|
move-result v17
|
|
|
|
if-eqz v17, :cond_b
|
|
|
|
if-eqz v4, :cond_b
|
|
|
|
goto :goto_9
|
|
|
|
:cond_b
|
|
const/4 v8, 0x0
|
|
|
|
:goto_9
|
|
sget-object v9, Lorg/webrtc/RendererCommon$ScalingType;->SCALE_ASPECT_BALANCED:Lorg/webrtc/RendererCommon$ScalingType;
|
|
|
|
invoke-direct {v3, v15, v8, v9, v13}, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;-><init>(Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;ZLorg/webrtc/RendererCommon$ScalingType;Lorg/webrtc/RendererCommon$ScalingType;)V
|
|
|
|
invoke-interface {v14, v3}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
const/4 v8, 0x1
|
|
|
|
goto :goto_8
|
|
|
|
:cond_c
|
|
move-object v8, v14
|
|
|
|
goto :goto_a
|
|
|
|
:cond_d
|
|
sget-object v3, Lw/q/o;->d:Lw/q/o;
|
|
|
|
move-object v8, v3
|
|
|
|
:goto_a
|
|
if-eqz v7, :cond_13
|
|
|
|
if-nez v10, :cond_13
|
|
|
|
if-eqz v11, :cond_12
|
|
|
|
invoke-virtual {v5}, Lcom/discord/widgets/voice/model/CallModel;->getParticipants()Ljava/util/Map;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v3}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v3}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v3
|
|
|
|
:cond_e
|
|
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v7
|
|
|
|
if-eqz v7, :cond_11
|
|
|
|
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v7
|
|
|
|
move-object v9, v7
|
|
|
|
check-cast v9, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
invoke-virtual {v9}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->getUser()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v9
|
|
|
|
invoke-virtual {v9}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v9
|
|
|
|
if-nez v2, :cond_f
|
|
|
|
goto :goto_b
|
|
|
|
:cond_f
|
|
invoke-virtual {v2}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v11
|
|
|
|
cmp-long v13, v9, v11
|
|
|
|
if-eqz v13, :cond_10
|
|
|
|
:goto_b
|
|
const/4 v9, 0x1
|
|
|
|
goto :goto_c
|
|
|
|
:cond_10
|
|
const/4 v9, 0x0
|
|
|
|
:goto_c
|
|
if-eqz v9, :cond_e
|
|
|
|
goto :goto_d
|
|
|
|
:cond_11
|
|
const/4 v7, 0x0
|
|
|
|
:goto_d
|
|
move-object v3, v7
|
|
|
|
check-cast v3, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
goto :goto_e
|
|
|
|
:cond_12
|
|
invoke-virtual {v5}, Lcom/discord/widgets/voice/model/CallModel;->getParticipants()Ljava/util/Map;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v5}, Lcom/discord/widgets/voice/model/CallModel;->getMyId()J
|
|
|
|
move-result-wide v9
|
|
|
|
invoke-static {v9, v10}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v2, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
move-object v3, v2
|
|
|
|
check-cast v3, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
goto :goto_e
|
|
|
|
:cond_13
|
|
const/4 v3, 0x0
|
|
|
|
:goto_e
|
|
if-eqz v3, :cond_15
|
|
|
|
new-instance v2, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;
|
|
|
|
invoke-virtual {v3}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isMe()Z
|
|
|
|
move-result v7
|
|
|
|
if-eqz v7, :cond_14
|
|
|
|
if-eqz v4, :cond_14
|
|
|
|
const/4 v4, 0x1
|
|
|
|
goto :goto_f
|
|
|
|
:cond_14
|
|
const/4 v4, 0x0
|
|
|
|
:goto_f
|
|
sget-object v7, Lorg/webrtc/RendererCommon$ScalingType;->SCALE_ASPECT_BALANCED:Lorg/webrtc/RendererCommon$ScalingType;
|
|
|
|
sget-object v9, Lorg/webrtc/RendererCommon$ScalingType;->SCALE_ASPECT_FIT:Lorg/webrtc/RendererCommon$ScalingType;
|
|
|
|
invoke-direct {v2, v3, v4, v7, v9}, Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;-><init>(Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;ZLorg/webrtc/RendererCommon$ScalingType;Lorg/webrtc/RendererCommon$ScalingType;)V
|
|
|
|
move-object v9, v2
|
|
|
|
goto :goto_10
|
|
|
|
:cond_15
|
|
const/4 v9, 0x0
|
|
|
|
:goto_10
|
|
if-eqz v1, :cond_16
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;->getUiState()Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_16
|
|
|
|
goto :goto_11
|
|
|
|
:cond_16
|
|
sget-object v1, Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;->VOICE_CALL_STATUS:Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;
|
|
|
|
:goto_11
|
|
invoke-direct {v0, v5, v1}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->mapToUiState(Lcom/discord/widgets/voice/model/CallModel;Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;)Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;
|
|
|
|
move-result-object v7
|
|
|
|
iget-object v1, v0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->hideChromeSubscription:Lrx/Subscription;
|
|
|
|
if-eqz v1, :cond_17
|
|
|
|
invoke-interface {v1}, Lrx/Subscription;->unsubscribe()V
|
|
|
|
:cond_17
|
|
sget-object v1, Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;->VIDEO_GRID:Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;
|
|
|
|
if-ne v7, v1, :cond_19
|
|
|
|
iget-boolean v1, v0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->pttPressed:Z
|
|
|
|
if-eqz v1, :cond_18
|
|
|
|
goto :goto_12
|
|
|
|
:cond_18
|
|
const/4 v10, 0x0
|
|
|
|
goto :goto_13
|
|
|
|
:cond_19
|
|
:goto_12
|
|
const/4 v10, 0x1
|
|
|
|
:goto_13
|
|
if-eqz v10, :cond_1a
|
|
|
|
iget-object v1, v0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->hideChromeSubscription:Lrx/Subscription;
|
|
|
|
if-eqz v1, :cond_1a
|
|
|
|
invoke-interface {v1}, Lrx/Subscription;->unsubscribe()V
|
|
|
|
:cond_1a
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$StoreState;->isAudioOutputSelectorV2Enabled()Z
|
|
|
|
move-result v12
|
|
|
|
invoke-virtual {v5}, Lcom/discord/widgets/voice/model/CallModel;->getAudioDevicesState()Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v5}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->shouldShowMoreAudioOutputs(Lcom/discord/widgets/voice/model/CallModel;)Z
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;->getSelectedOutputDevice()Lcom/discord/stores/StoreAudioDevices$OutputDevice;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v2, :cond_1d
|
|
|
|
if-eqz v12, :cond_1d
|
|
|
|
instance-of v2, v1, Lcom/discord/stores/StoreAudioDevices$OutputDevice$BluetoothAudio;
|
|
|
|
if-eqz v2, :cond_1b
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/call/WidgetPrivateCallControlsView$OutputSelectorState;->BLUETOOTH_ON_AND_MORE:Lcom/discord/widgets/voice/call/WidgetPrivateCallControlsView$OutputSelectorState;
|
|
|
|
goto :goto_14
|
|
|
|
:cond_1b
|
|
instance-of v1, v1, Lcom/discord/stores/StoreAudioDevices$OutputDevice$Speaker;
|
|
|
|
if-eqz v1, :cond_1c
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/call/WidgetPrivateCallControlsView$OutputSelectorState;->SPEAKER_ON_AND_MORE:Lcom/discord/widgets/voice/call/WidgetPrivateCallControlsView$OutputSelectorState;
|
|
|
|
goto :goto_14
|
|
|
|
:cond_1c
|
|
sget-object v1, Lcom/discord/widgets/voice/call/WidgetPrivateCallControlsView$OutputSelectorState;->SPEAKER_OFF_AND_MORE:Lcom/discord/widgets/voice/call/WidgetPrivateCallControlsView$OutputSelectorState;
|
|
|
|
goto :goto_14
|
|
|
|
:cond_1d
|
|
instance-of v1, v1, Lcom/discord/stores/StoreAudioDevices$OutputDevice$Speaker;
|
|
|
|
if-eqz v1, :cond_1e
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/call/WidgetPrivateCallControlsView$OutputSelectorState;->SPEAKER_ON:Lcom/discord/widgets/voice/call/WidgetPrivateCallControlsView$OutputSelectorState;
|
|
|
|
goto :goto_14
|
|
|
|
:cond_1e
|
|
sget-object v1, Lcom/discord/widgets/voice/call/WidgetPrivateCallControlsView$OutputSelectorState;->SPEAKER_OFF:Lcom/discord/widgets/voice/call/WidgetPrivateCallControlsView$OutputSelectorState;
|
|
|
|
:goto_14
|
|
move-object v11, v1
|
|
|
|
new-instance v1, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;
|
|
|
|
move-object v4, v1
|
|
|
|
invoke-direct/range {v4 .. v12}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;-><init>(Lcom/discord/widgets/voice/model/CallModel;Ljava/util/List;Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;Ljava/util/List;Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;ZLcom/discord/widgets/voice/call/WidgetPrivateCallControlsView$OutputSelectorState;Z)V
|
|
|
|
invoke-virtual {v0, v1}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
:cond_1f
|
|
return-void
|
|
.end method
|
|
|
|
.method private final hideChromeDelayed()V
|
|
.locals 12
|
|
|
|
sget-object v0, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
const-wide/16 v1, 0xbb8
|
|
|
|
invoke-static {v1, v2, v0}, Lrx/Observable;->i(JLjava/util/concurrent/TimeUnit;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->timerScheduler:Lrx/Scheduler;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->b(Lrx/Scheduler;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Observable.timer(\n \u2026bscribeOn(timerScheduler)"
|
|
|
|
invoke-static {v0, v1}, Lw/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 v3
|
|
|
|
const-class v4, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;
|
|
|
|
new-instance v6, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$hideChromeDelayed$1;
|
|
|
|
invoke-direct {v6, p0}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$hideChromeDelayed$1;-><init>(Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;)V
|
|
|
|
new-instance v9, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$hideChromeDelayed$2;
|
|
|
|
invoke-direct {v9, p0}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$hideChromeDelayed$2;-><init>(Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;)V
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/16 v10, 0x1a
|
|
|
|
const/4 v11, 0x0
|
|
|
|
invoke-static/range {v3 .. v11}, 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
|
|
.end method
|
|
|
|
.method private final interactWithUi()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/call/WidgetPrivateCallViewModel$ViewState$Loaded;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:cond_0
|
|
move-object v1, v0
|
|
|
|
check-cast v1, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;
|
|
|
|
if-eqz v1, :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, 0x1
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/16 v10, 0xdf
|
|
|
|
const/4 v11, 0x0
|
|
|
|
invoke-static/range {v1 .. v11}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;->copy$default(Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;Lcom/discord/widgets/voice/model/CallModel;Ljava/util/List;Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;Ljava/util/List;Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;ZLcom/discord/widgets/voice/call/WidgetPrivateCallControlsView$OutputSelectorState;ZILjava/lang/Object;)Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0, v0}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->hideChromeDelayed()V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method private final mapToUiState(Lcom/discord/widgets/voice/model/CallModel;Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;)Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/voice/model/CallModel;->isVideoCall()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/voice/model/CallModel;->isConnected()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
:goto_0
|
|
sget-object v0, Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;->PARTICIPANT_LIST:Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;
|
|
|
|
if-ne p2, v0, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
if-eqz p1, :cond_2
|
|
|
|
sget-object v0, Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;->VIDEO_GRID:Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
sget-object v0, Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;->VOICE_CALL_STATUS:Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;
|
|
|
|
:goto_1
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final shouldIncludeParticipant(Lcom/discord/widgets/voice/model/CallModel;Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;)Z
|
|
.locals 2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/voice/model/CallModel;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->isMultiUserDM()Z
|
|
|
|
move-result p1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p2}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isConnected()Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
invoke-virtual {p2}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isRinging()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {p2}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isMe()Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
:cond_2
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method private final shouldShowMoreAudioOutputs(Lcom/discord/widgets/voice/model/CallModel;)Z
|
|
.locals 2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/voice/model/CallModel;->getAudioDevicesState()Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;->getAvailableOutputDevices()Ljava/util/Set;
|
|
|
|
move-result-object p1
|
|
|
|
instance-of v0, p1, Ljava/util/Collection;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
:cond_1
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/stores/StoreAudioDevices$OutputDevice;
|
|
|
|
instance-of v0, v0, Lcom/discord/stores/StoreAudioDevices$OutputDevice$BluetoothAudio;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const/4 v1, 0x1
|
|
|
|
:cond_2
|
|
:goto_0
|
|
return v1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final clickAudioOutputSelector()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/call/WidgetPrivateCallViewModel$ViewState$Loaded;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:cond_0
|
|
check-cast v0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;->isAudioOutputSelectorV2Enabled()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-direct {p0, v1}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->shouldShowMoreAudioOutputs(Lcom/discord/widgets/voice/model/CallModel;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Event$ShowAudioOutputSelectionDialog;->INSTANCE:Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Event$ShowAudioOutputSelectionDialog;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/PublishSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->storeAudioDevices:Lcom/discord/stores/StoreAudioDevices;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreAudioDevices;->toggleSpeakerOutput()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->storeAudioDevices:Lcom/discord/stores/StoreAudioDevices;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreAudioDevices;->toggleSpeakerOutput()V
|
|
|
|
:cond_3
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final getClock()Lcom/discord/utilities/time/Clock;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->clock:Lcom/discord/utilities/time/Clock;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getStoreAudioDevices()Lcom/discord/stores/StoreAudioDevices;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->storeAudioDevices:Lcom/discord/stores/StoreAudioDevices;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getStoreMediaEngine()Lcom/discord/stores/StoreMediaEngine;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->storeMediaEngine:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getStoreStateObservable()Lrx/Observable;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$StoreState;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->storeStateObservable:Lrx/Observable;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getStoreVoiceParticipants()Lcom/discord/stores/StoreVoiceParticipants;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->storeVoiceParticipants:Lcom/discord/stores/StoreVoiceParticipants;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getTimerScheduler()Lrx/Scheduler;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->timerScheduler:Lrx/Scheduler;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final handlePttPressed(Z)V
|
|
.locals 11
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iput-boolean p1, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->pttPressed:Z
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->storeMediaEngine:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/stores/StoreMediaEngine;->setPttActive(Z)V
|
|
|
|
invoke-virtual {p0}, Le/a/b/c0;->getViewState()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
instance-of v0, p1, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
:cond_0
|
|
move-object v0, p1
|
|
|
|
check-cast v0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
iget-boolean p1, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->pttPressed:Z
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x1
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/16 v9, 0xdf
|
|
|
|
const/4 v10, 0x0
|
|
|
|
invoke-static/range {v0 .. v10}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;->copy$default(Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;Lcom/discord/widgets/voice/model/CallModel;Ljava/util/List;Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;Ljava/util/List;Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;ZLcom/discord/widgets/voice/call/WidgetPrivateCallControlsView$OutputSelectorState;ZILjava/lang/Object;)Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->hideChromeDelayed()V
|
|
|
|
:cond_2
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final observeEvents()Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$Event;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
const-string v1, "eventSubject"
|
|
|
|
invoke-static {v0, v1}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final onBackPressed()Z
|
|
.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/call/WidgetPrivateCallViewModel$ViewState$Loaded;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
:cond_0
|
|
check-cast v0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;->getUiState()Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v3, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$WhenMappings;->$EnumSwitchMapping$0:[I
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v0
|
|
|
|
aget v0, v3, v0
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-eq v0, v3, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
invoke-virtual {v2}, Lcom/discord/widgets/voice/model/CallModel;->isVideoCall()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
sget-object v0, Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;->VIDEO_GRID:Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
sget-object v0, Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;->VOICE_CALL_STATUS:Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;
|
|
|
|
:goto_0
|
|
invoke-virtual {p0, v0}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->requestUiState(Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;)V
|
|
|
|
const/4 v1, 0x1
|
|
|
|
:cond_3
|
|
:goto_1
|
|
return v1
|
|
.end method
|
|
|
|
.method public final requestUiState(Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;)V
|
|
.locals 12
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
invoke-virtual {p0}, Le/a/b/c0;->getViewState()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
instance-of v2, v1, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v0, v1
|
|
|
|
:goto_0
|
|
move-object v1, v0
|
|
|
|
check-cast v1, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-direct {p0, v0, p1}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->mapToUiState(Lcom/discord/widgets/voice/model/CallModel;Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;)Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;
|
|
|
|
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/4 v8, 0x0
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/16 v10, 0xfb
|
|
|
|
const/4 v11, 0x0
|
|
|
|
invoke-static/range {v1 .. v11}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;->copy$default(Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;Lcom/discord/widgets/voice/model/CallModel;Ljava/util/List;Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;Ljava/util/List;Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;ZLcom/discord/widgets/voice/call/WidgetPrivateCallControlsView$OutputSelectorState;ZILjava/lang/Object;)Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
|
|
:cond_2
|
|
const-string p1, "uiState"
|
|
|
|
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final selectParticipant(J)V
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->storeVoiceParticipants:Lcom/discord/stores/StoreVoiceParticipants;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/stores/StoreVoiceParticipants;->selectParticipant(Ljava/lang/Long;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final tapUser(J)V
|
|
.locals 11
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->tappedUsers:Ljava/util/Set;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->tappedUsers:Ljava/util/Set;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Set;->remove(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->tappedUsers:Ljava/util/Set;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Set;->add(Ljava/lang/Object;)Z
|
|
|
|
:goto_0
|
|
invoke-virtual {p0}, Le/a/b/c0;->getViewState()Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
instance-of p2, p1, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;
|
|
|
|
if-nez p2, :cond_1
|
|
|
|
const/4 p1, 0x0
|
|
|
|
:cond_1
|
|
move-object v0, p1
|
|
|
|
check-cast v0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->tappedUsers:Ljava/util/Set;
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->createCallUserListItems(Lcom/discord/widgets/voice/model/CallModel;Ljava/util/Set;)Ljava/util/List;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x0
|
|
|
|
const/16 v9, 0xfd
|
|
|
|
const/4 v10, 0x0
|
|
|
|
invoke-static/range {v0 .. v10}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;->copy$default(Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;Lcom/discord/widgets/voice/model/CallModel;Ljava/util/List;Lcom/discord/widgets/voice/call/WidgetPrivateCall$UiState;Ljava/util/List;Lcom/discord/views/video/VideoCallParticipantView$ParticipantData;ZLcom/discord/widgets/voice/call/WidgetPrivateCallControlsView$OutputSelectorState;ZILjava/lang/Object;)Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel$ViewState$Loaded;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Le/a/b/c0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public final tapVideoParticipantFromGrid(J)V
|
|
.locals 7
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->interactWithUi()V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->clock:Lcom/discord/utilities/time/Clock;
|
|
|
|
invoke-interface {v0}, Lcom/discord/utilities/time/Clock;->currentTimeMillis()J
|
|
|
|
move-result-wide v0
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->lastTappedParticipant:Lkotlin/Pair;
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
invoke-virtual {v2}, Lkotlin/Pair;->component1()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-virtual {v2}, Lkotlin/Pair;->component2()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v5
|
|
|
|
cmp-long v2, p1, v3
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
sub-long v2, v0, v5
|
|
|
|
const-wide/16 v4, 0x3e8
|
|
|
|
cmp-long v6, v2, v4
|
|
|
|
if-gez v6, :cond_0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v2, :cond_3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->selectedParticipantId:Ljava/lang/Long;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
invoke-virtual {v0}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v2
|
|
|
|
cmp-long v0, p1, v2
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
:goto_1
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->storeVoiceParticipants:Lcom/discord/stores/StoreVoiceParticipants;
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/stores/StoreVoiceParticipants;->selectParticipant(Ljava/lang/Long;)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
iget-object p1, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->storeVoiceParticipants:Lcom/discord/stores/StoreVoiceParticipants;
|
|
|
|
invoke-virtual {p1, v1}, Lcom/discord/stores/StoreVoiceParticipants;->selectParticipant(Ljava/lang/Long;)V
|
|
|
|
:goto_2
|
|
iput-object v1, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->lastTappedParticipant:Lkotlin/Pair;
|
|
|
|
return-void
|
|
|
|
:cond_3
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p2
|
|
|
|
new-instance v0, Lkotlin/Pair;
|
|
|
|
invoke-direct {v0, p1, p2}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/voice/call/WidgetPrivateCallViewModel;->lastTappedParticipant:Lkotlin/Pair;
|
|
|
|
return-void
|
|
.end method
|