1228 lines
40 KiB
Smali
1228 lines
40 KiB
Smali
.class public final Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;
|
|
.super Lf/a/b/q0;
|
|
.source "WidgetVoiceBottomSheetViewModel.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$ViewState;,
|
|
Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState;,
|
|
Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event;,
|
|
Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Factory;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lf/a/b/q0<",
|
|
"Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$ViewState;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final channelId:J
|
|
|
|
.field public final eventSubject:Lrx/subjects/PublishSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/PublishSubject<",
|
|
"Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final forwardToFullscreenIfVideoActivated:Z
|
|
|
|
.field public final mediaEngineStore:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
.field public final mediaSettingsStore:Lcom/discord/stores/StoreMediaSettings;
|
|
|
|
.field public mostRecentStoreState:Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState;
|
|
|
|
.field public final selectedVoiceChannelStore:Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
.field public final userSettingsStore:Lcom/discord/stores/StoreUserSettings;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(JZLrx/Observable;Lcom/discord/stores/StoreVoiceChannelSelected;Lcom/discord/stores/StoreMediaSettings;Lcom/discord/stores/StoreMediaEngine;Lcom/discord/stores/StoreUserSettings;)V
|
|
.locals 16
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(JZ",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState;",
|
|
">;",
|
|
"Lcom/discord/stores/StoreVoiceChannelSelected;",
|
|
"Lcom/discord/stores/StoreMediaSettings;",
|
|
"Lcom/discord/stores/StoreMediaEngine;",
|
|
"Lcom/discord/stores/StoreUserSettings;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-object/from16 v1, p4
|
|
|
|
move-object/from16 v2, p5
|
|
|
|
move-object/from16 v3, p6
|
|
|
|
move-object/from16 v4, p7
|
|
|
|
move-object/from16 v5, p8
|
|
|
|
const/4 v6, 0x0
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
if-eqz v5, :cond_0
|
|
|
|
const/4 v7, 0x1
|
|
|
|
invoke-direct {v0, v6, v7, v6}, Lf/a/b/q0;-><init>(Ljava/lang/Object;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
move-wide/from16 v7, p1
|
|
|
|
iput-wide v7, v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->channelId:J
|
|
|
|
move/from16 v7, p3
|
|
|
|
iput-boolean v7, v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->forwardToFullscreenIfVideoActivated:Z
|
|
|
|
iput-object v2, v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->selectedVoiceChannelStore:Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
iput-object v3, v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->mediaSettingsStore:Lcom/discord/stores/StoreMediaSettings;
|
|
|
|
iput-object v4, v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->mediaEngineStore:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
iput-object v5, v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->userSettingsStore:Lcom/discord/stores/StoreUserSettings;
|
|
|
|
invoke-static {}, Lrx/subjects/PublishSubject;->f0()Lrx/subjects/PublishSubject;
|
|
|
|
move-result-object v2
|
|
|
|
iput-object v2, v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
const/4 v2, 0x2
|
|
|
|
invoke-static {v1, v0, v6, v2, v6}, 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 v7
|
|
|
|
const-class v8, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/4 v10, 0x0
|
|
|
|
const/4 v11, 0x0
|
|
|
|
const/4 v12, 0x0
|
|
|
|
new-instance v13, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$1;
|
|
|
|
invoke-direct {v13, v0}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$1;-><init>(Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;)V
|
|
|
|
const/16 v14, 0x1e
|
|
|
|
const/4 v15, 0x0
|
|
|
|
invoke-static/range {v7 .. v15}, 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, "userSettingsStore"
|
|
|
|
invoke-static {v1}, Lj0/o/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v6
|
|
|
|
:cond_1
|
|
const-string v1, "mediaEngineStore"
|
|
|
|
invoke-static {v1}, Lj0/o/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v6
|
|
|
|
:cond_2
|
|
const-string v1, "mediaSettingsStore"
|
|
|
|
invoke-static {v1}, Lj0/o/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v6
|
|
|
|
:cond_3
|
|
const-string v1, "selectedVoiceChannelStore"
|
|
|
|
invoke-static {v1}, Lj0/o/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v6
|
|
|
|
:cond_4
|
|
const-string v1, "storeStateObservable"
|
|
|
|
invoke-static {v1}, Lj0/o/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v6
|
|
.end method
|
|
|
|
.method public static final synthetic access$handleStoreState(Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->handleStoreState(Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final createConnectedListItems(Ljava/util/Map;Ljava/lang/String;)Ljava/util/List;
|
|
.locals 8
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;",
|
|
">;",
|
|
"Ljava/lang/String;",
|
|
")",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/widgets/voice/sheet/CallParticipantsAdapter$ListItem;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
new-instance v2, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
invoke-interface {p1}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_0
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
invoke-virtual {v3}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isConnected()Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
invoke-virtual {v1, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {v2, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
invoke-interface {v1}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result p1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
xor-int/2addr p1, v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
const/4 v4, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/4 v4, 0x0
|
|
|
|
:goto_1
|
|
if-eqz p1, :cond_5
|
|
|
|
invoke-direct {p0, p2}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->createUserItemsComparator(Ljava/lang/String;)Ljava/util/Comparator;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {v1, p1}, Lj0/j/l;->sortedWith(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
const/16 v5, 0xa
|
|
|
|
invoke-static {p1, v5}, Lj0/f;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
move-result v5
|
|
|
|
invoke-direct {v1, v5}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_2
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_4
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
new-instance v6, Lcom/discord/widgets/voice/sheet/CallParticipantsAdapter$ListItem$VoiceUser;
|
|
|
|
if-eqz v4, :cond_3
|
|
|
|
invoke-virtual {v5}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->getWatchingStream()Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-static {p2, v7}, Lj0/o/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v7
|
|
|
|
if-eqz v7, :cond_3
|
|
|
|
const/4 v7, 0x1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
const/4 v7, 0x0
|
|
|
|
:goto_3
|
|
invoke-direct {v6, v5, v7}, Lcom/discord/widgets/voice/sheet/CallParticipantsAdapter$ListItem$VoiceUser;-><init>(Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;Z)V
|
|
|
|
invoke-interface {v1, v6}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z
|
|
|
|
:cond_5
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final createUserItemsComparator(Ljava/lang/String;)Ljava/util/Comparator;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/lang/String;",
|
|
")",
|
|
"Ljava/util/Comparator<",
|
|
"Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$createUserItemsComparator$1;
|
|
|
|
invoke-direct {v0, p1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$createUserItemsComparator$1;-><init>(Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static synthetic createUserItemsComparator$default(Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;Ljava/lang/String;ILjava/lang/Object;)Ljava/util/Comparator;
|
|
.locals 0
|
|
|
|
and-int/lit8 p2, p2, 0x1
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
:cond_0
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->createUserItemsComparator(Ljava/lang/String;)Ljava/util/Comparator;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private final handleStoreState(Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState;)V
|
|
.locals 21
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-object/from16 v1, p1
|
|
|
|
iput-object v1, v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->mostRecentStoreState:Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState;
|
|
|
|
instance-of v2, v1, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
check-cast v1, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/widgets/voice/model/CallModel;->isConnected()Z
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x1
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/widgets/voice/model/CallModel;->isVideoCall()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
iget-boolean v2, v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->forwardToFullscreenIfVideoActivated:Z
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
const/4 v5, 0x0
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
iget-object v2, v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
new-instance v3, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$LaunchVideoCall;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/model/CallModel;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v6
|
|
|
|
invoke-direct {v3, v6, v7, v5}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$LaunchVideoCall;-><init>(JLjava/lang/String;)V
|
|
|
|
iget-object v1, v2, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {v1, v3}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/widgets/voice/model/CallModel;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelChannel;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/widgets/voice/model/CallModel;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelGuild;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
move-object v8, v2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
move-object v8, v5
|
|
|
|
:goto_1
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/widgets/voice/model/CallModel;->getActiveStream()Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
invoke-virtual {v2}, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;->getStream()Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelApplicationStream;->getEncodedStreamKey()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
move-object v2, v5
|
|
|
|
:goto_2
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v6}, Lcom/discord/widgets/voice/model/CallModel;->getParticipants()Ljava/util/Map;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-direct {v0, v6, v2}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->createConnectedListItems(Ljava/util/Map;Ljava/lang/String;)Ljava/util/List;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v2}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v6
|
|
|
|
xor-int/2addr v6, v4
|
|
|
|
if-eqz v6, :cond_5
|
|
|
|
new-instance v6, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$CenterContent$ListItems;
|
|
|
|
invoke-direct {v6, v2}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$CenterContent$ListItems;-><init>(Ljava/util/List;)V
|
|
|
|
move-object v14, v6
|
|
|
|
goto :goto_3
|
|
|
|
:cond_5
|
|
sget-object v2, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$CenterContent$Empty;->INSTANCE:Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$CenterContent$Empty;
|
|
|
|
move-object v14, v2
|
|
|
|
:goto_3
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/widgets/voice/model/CallModel;->isConnected()Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_7
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/widgets/voice/model/CallModel;->getVoiceChannelJoinability()Lcom/discord/utilities/voice/VoiceChannelJoinability;
|
|
|
|
move-result-object v2
|
|
|
|
sget-object v6, Lcom/discord/utilities/voice/VoiceChannelJoinability;->PERMISSIONS_MISSING:Lcom/discord/utilities/voice/VoiceChannelJoinability;
|
|
|
|
if-eq v2, v6, :cond_6
|
|
|
|
const/4 v2, 0x1
|
|
|
|
goto :goto_4
|
|
|
|
:cond_6
|
|
const/4 v2, 0x0
|
|
|
|
:goto_4
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v6}, Lcom/discord/widgets/voice/model/CallModel;->getVideoDevices()Ljava/util/List;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-interface {v6}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v6
|
|
|
|
xor-int/2addr v6, v4
|
|
|
|
new-instance v9, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$BottomContent$Connect;
|
|
|
|
invoke-direct {v9, v2, v6}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$BottomContent$Connect;-><init>(ZZ)V
|
|
|
|
move-object v15, v9
|
|
|
|
goto :goto_5
|
|
|
|
:cond_7
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/widgets/voice/model/CallModel;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelChannel;->isPrivate()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_8
|
|
|
|
move-object v15, v5
|
|
|
|
goto :goto_5
|
|
|
|
:cond_8
|
|
new-instance v2, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$BottomContent$Controls;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v6}, Lcom/discord/widgets/voice/model/CallModel;->isSelfMuted()Z
|
|
|
|
move-result v18
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v6}, Lcom/discord/widgets/voice/model/CallModel;->isSelfDeafened()Z
|
|
|
|
move-result v19
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v6}, Lcom/discord/widgets/voice/model/CallModel;->getInputMode()Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$InputMode;
|
|
|
|
move-result-object v16
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v6}, Lcom/discord/widgets/voice/model/CallModel;->getAudioDevicesState()Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;
|
|
|
|
move-result-object v17
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v6}, Lcom/discord/widgets/voice/model/CallModel;->getCameraState()Lcom/discord/widgets/voice/model/CameraState;
|
|
|
|
move-result-object v20
|
|
|
|
move-object v15, v2
|
|
|
|
invoke-direct/range {v15 .. v20}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$BottomContent$Controls;-><init>(Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$InputMode;Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;ZZLcom/discord/widgets/voice/model/CameraState;)V
|
|
|
|
:goto_5
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/widgets/voice/model/CallModel;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelChannel;->isPrivate()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_9
|
|
|
|
goto :goto_6
|
|
|
|
:cond_9
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/widgets/voice/model/CallModel;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelChannel;->getGuildId()Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
:goto_6
|
|
move-object v11, v5
|
|
|
|
new-instance v2, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$ViewState;
|
|
|
|
const-string v5, "title"
|
|
|
|
invoke-static {v7, v5}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-wide v9, v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->channelId:J
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5}, Lcom/discord/widgets/voice/model/CallModel;->getCanInvite()Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_a
|
|
|
|
if-eqz v11, :cond_a
|
|
|
|
const/4 v12, 0x1
|
|
|
|
goto :goto_7
|
|
|
|
:cond_a
|
|
const/4 v12, 0x0
|
|
|
|
:goto_7
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getNoiseCancellation()Ljava/lang/Boolean;
|
|
|
|
move-result-object v13
|
|
|
|
move-object v6, v2
|
|
|
|
invoke-direct/range {v6 .. v15}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$ViewState;-><init>(Ljava/lang/String;Ljava/lang/String;JLjava/lang/Long;ZLjava/lang/Boolean;Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$CenterContent;Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$BottomContent;)V
|
|
|
|
invoke-virtual {v0, v2}, Lf/a/b/q0;->updateViewState(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final observeEvents()Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
const-string v1, "eventSubject"
|
|
|
|
invoke-static {v0, v1}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final onCameraButtonPressed()V
|
|
.locals 3
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Lf/a/b/q0;->requireViewState()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$ViewState;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$ViewState;->getBottomContent()Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$BottomContent;
|
|
|
|
move-result-object v0
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$BottomContent$Controls;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
move-object v0, v2
|
|
|
|
:cond_0
|
|
check-cast v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$BottomContent$Controls;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheet$BottomContent$Controls;->getCameraState()Lcom/discord/widgets/voice/model/CameraState;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
move-object v0, v2
|
|
|
|
:goto_0
|
|
sget-object v1, Lcom/discord/widgets/voice/model/CameraState;->CAMERA_DISABLED:Lcom/discord/widgets/voice/model/CameraState;
|
|
|
|
if-ne v0, v1, :cond_2
|
|
|
|
return-void
|
|
|
|
:cond_2
|
|
sget-object v1, Lcom/discord/widgets/voice/model/CameraState;->CAMERA_ON:Lcom/discord/widgets/voice/model/CameraState;
|
|
|
|
if-ne v0, v1, :cond_3
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
const/4 v0, 0x0
|
|
|
|
:goto_1
|
|
if-eqz v0, :cond_4
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->mediaEngineStore:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
invoke-virtual {v0, v2}, Lcom/discord/stores/StoreMediaEngine;->selectVideoInputDevice(Ljava/lang/String;)V
|
|
|
|
goto :goto_3
|
|
|
|
:cond_4
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->mostRecentStoreState:Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState;
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;
|
|
|
|
if-nez v1, :cond_5
|
|
|
|
goto :goto_2
|
|
|
|
:cond_5
|
|
move-object v2, v0
|
|
|
|
:goto_2
|
|
check-cast v2, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;
|
|
|
|
if-eqz v2, :cond_7
|
|
|
|
invoke-virtual {v2}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/model/CallModel;->getNumUsersConnected()I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {v2}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/voice/model/CallModel;->getGuildMaxVideoChannelMembers()Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v2
|
|
|
|
invoke-static {v0, v2}, Lj0/o/c/h;->compare(II)I
|
|
|
|
move-result v0
|
|
|
|
if-lez v0, :cond_6
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
new-instance v2, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$ShowCameraCapacityDialog;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v1
|
|
|
|
invoke-direct {v2, v1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$ShowCameraCapacityDialog;-><init>(I)V
|
|
|
|
iget-object v0, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {v0, v2}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
goto :goto_3
|
|
|
|
:cond_6
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$ShowRequestCameraPermissionsDialog;->INSTANCE:Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$ShowRequestCameraPermissionsDialog;
|
|
|
|
iget-object v0, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
:cond_7
|
|
:goto_3
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onCameraPermissionsGranted()V
|
|
.locals 3
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->mediaEngineStore:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-static {v0, v1, v2, v1}, Lcom/discord/stores/StoreMediaEngine;->selectDefaultVideoDevice$default(Lcom/discord/stores/StoreMediaEngine;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onDeafenPressed()V
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->mediaSettingsStore:Lcom/discord/stores/StoreMediaSettings;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreMediaSettings;->toggleSelfDeafened()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onDisconnectPressed()V
|
|
.locals 2
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->selectedVoiceChannelStore:Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreVoiceChannelSelected;->clear()V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$Dismiss;->INSTANCE:Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$Dismiss;
|
|
|
|
iget-object v0, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onMutePressed()V
|
|
.locals 3
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->mediaSettingsStore:Lcom/discord/stores/StoreMediaSettings;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreMediaSettings;->toggleSelfMuted()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
new-instance v1, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$ShowToast;
|
|
|
|
const v2, 0x7f121700
|
|
|
|
invoke-direct {v1, v2}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$ShowToast;-><init>(I)V
|
|
|
|
iget-object v0, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onNoiseCancellationPressed()V
|
|
.locals 3
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Lf/a/b/q0;->requireViewState()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$ViewState;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$ViewState;->isNoiseCancellationActive()Ljava/lang/Boolean;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result v0
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->mediaSettingsStore:Lcom/discord/stores/StoreMediaSettings;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreMediaSettings;->toggleNoiseCancellation()V
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
new-instance v1, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$ShowToast;
|
|
|
|
const v2, 0x7f120f45
|
|
|
|
invoke-direct {v1, v2}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$ShowToast;-><init>(I)V
|
|
|
|
iget-object v0, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
new-instance v1, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$ShowToast;
|
|
|
|
const v2, 0x7f120f46
|
|
|
|
invoke-direct {v1, v2}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$ShowToast;-><init>(I)V
|
|
|
|
iget-object v0, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
:cond_1
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onPttPressed(Z)V
|
|
.locals 1
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->mediaEngineStore:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/stores/StoreMediaEngine;->setPttActive(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final onStreamPreviewClicked(Ljava/lang/String;)V
|
|
.locals 5
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->mostRecentStoreState:Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState;
|
|
|
|
instance-of v2, v1, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v0, v1
|
|
|
|
:goto_0
|
|
check-cast v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/model/CallModel;->getVoiceChannelJoinability()Lcom/discord/utilities/voice/VoiceChannelJoinability;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/discord/utilities/voice/VoiceChannelJoinability;->GUILD_VIDEO_AT_CAPACITY:Lcom/discord/utilities/voice/VoiceChannelJoinability;
|
|
|
|
if-ne v0, v1, :cond_1
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
sget-object v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$ShowGuildVideoAtCapacityDialog;->INSTANCE:Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$ShowGuildVideoAtCapacityDialog;
|
|
|
|
iget-object p1, p1, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {p1, v0}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
sget-object v0, Lcom/discord/models/domain/ModelApplicationStream;->Companion:Lcom/discord/models/domain/ModelApplicationStream$Companion;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/models/domain/ModelApplicationStream$Companion;->decodeStreamKey(Ljava/lang/String;)Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
new-instance v2, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$LaunchVideoCall;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelApplicationStream;->getChannelId()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-direct {v2, v3, v4, p1}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$LaunchVideoCall;-><init>(JLjava/lang/String;)V
|
|
|
|
iget-object p1, v1, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {p1, v2}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
:cond_2
|
|
:goto_1
|
|
return-void
|
|
|
|
:cond_3
|
|
const-string p1, "streamKey"
|
|
|
|
invoke-static {p1}, Lj0/o/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final tryConnectToVoice(Z)V
|
|
.locals 3
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->mostRecentStoreState:Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState;
|
|
|
|
instance-of v1, v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
move-object v0, v2
|
|
|
|
:cond_0
|
|
check-cast v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$StoreState$Valid;->getCallModel()Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/voice/model/CallModel;->getVoiceChannelJoinability()Lcom/discord/utilities/voice/VoiceChannelJoinability;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/discord/utilities/voice/VoiceChannelJoinability;->GUILD_VIDEO_AT_CAPACITY:Lcom/discord/utilities/voice/VoiceChannelJoinability;
|
|
|
|
if-ne v0, v1, :cond_1
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
sget-object v0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$ShowGuildVideoAtCapacityDialog;->INSTANCE:Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$ShowGuildVideoAtCapacityDialog;
|
|
|
|
iget-object p1, p1, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {p1, v0}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->userSettingsStore:Lcom/discord/stores/StoreUserSettings;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreUserSettings;->getMobileOverlay()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->eventSubject:Lrx/subjects/PublishSubject;
|
|
|
|
sget-object v1, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$ShowOverlayNux;->INSTANCE:Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel$Event$ShowOverlayNux;
|
|
|
|
iget-object v0, v0, Lrx/subjects/PublishSubject;->e:Lrx/subjects/PublishSubject$b;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/PublishSubject$b;->onNext(Ljava/lang/Object;)V
|
|
|
|
:cond_2
|
|
if-eqz p1, :cond_3
|
|
|
|
sget-object p1, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/stores/StoreStream$Companion;->getMediaEngine()Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
move-result-object p1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
invoke-static {p1, v2, v0, v2}, Lcom/discord/stores/StoreMediaEngine;->selectDefaultVideoDevice$default(Lcom/discord/stores/StoreMediaEngine;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
|
|
|
|
:cond_3
|
|
iget-object p1, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->selectedVoiceChannelStore:Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
iget-wide v0, p0, Lcom/discord/widgets/voice/sheet/WidgetVoiceBottomSheetViewModel;->channelId:J
|
|
|
|
invoke-virtual {p1, v0, v1}, Lcom/discord/stores/StoreVoiceChannelSelected;->set(J)Lrx/Observable;
|
|
|
|
:cond_4
|
|
:goto_0
|
|
return-void
|
|
.end method
|