968 lines
29 KiB
Smali
968 lines
29 KiB
Smali
.class public final Lcom/discord/widgets/voice/model/CallModel$Companion;
|
|
.super Ljava/lang/Object;
|
|
.source "CallModel.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/voice/model/CallModel;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Companion"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/voice/model/CallModel$Companion$Chunk;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/voice/model/CallModel$Companion;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$create(Lcom/discord/widgets/voice/model/CallModel$Companion;Lcom/discord/models/domain/ModelChannel;JJLkotlin/Pair;Ljava/util/Map;Ljava/lang/Integer;Ljava/util/List;Lco/discord/media_engine/VideoInputDeviceDescription;Lcom/discord/widgets/voice/model/CallModel$ParticipantsType;Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;ZLcom/discord/stores/StoreRtcConnection$RtcConnectionAnalyticsInfo;ILcom/discord/stores/StoreAudioDevices$AudioDevicesState;)Lcom/discord/widgets/voice/model/CallModel;
|
|
.locals 1
|
|
|
|
invoke-direct/range {p0 .. p16}, Lcom/discord/widgets/voice/model/CallModel$Companion;->create(Lcom/discord/models/domain/ModelChannel;JJLkotlin/Pair;Ljava/util/Map;Ljava/lang/Integer;Ljava/util/List;Lco/discord/media_engine/VideoInputDeviceDescription;Lcom/discord/widgets/voice/model/CallModel$ParticipantsType;Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;ZLcom/discord/stores/StoreRtcConnection$RtcConnectionAnalyticsInfo;ILcom/discord/stores/StoreAudioDevices$AudioDevicesState;)Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static final synthetic access$observeChunk(Lcom/discord/widgets/voice/model/CallModel$Companion;Lcom/discord/models/domain/ModelChannel;)Lrx/Observable;
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/voice/model/CallModel$Companion;->observeChunk(Lcom/discord/models/domain/ModelChannel;)Lrx/Observable;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private final create(Lcom/discord/models/domain/ModelChannel;JJLkotlin/Pair;Ljava/util/Map;Ljava/lang/Integer;Ljava/util/List;Lco/discord/media_engine/VideoInputDeviceDescription;Lcom/discord/widgets/voice/model/CallModel$ParticipantsType;Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;ZLcom/discord/stores/StoreRtcConnection$RtcConnectionAnalyticsInfo;ILcom/discord/stores/StoreAudioDevices$AudioDevicesState;)Lcom/discord/widgets/voice/model/CallModel;
|
|
.locals 21
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
"JJ",
|
|
"Lkotlin/Pair<",
|
|
"Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;",
|
|
"Lcom/discord/utilities/media/AudioOutputState;",
|
|
">;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;",
|
|
">;",
|
|
"Ljava/lang/Integer;",
|
|
"Ljava/util/List<",
|
|
"Lco/discord/media_engine/VideoInputDeviceDescription;",
|
|
">;",
|
|
"Lco/discord/media_engine/VideoInputDeviceDescription;",
|
|
"Lcom/discord/widgets/voice/model/CallModel$ParticipantsType;",
|
|
"Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;",
|
|
"Z",
|
|
"Lcom/discord/stores/StoreRtcConnection$RtcConnectionAnalyticsInfo;",
|
|
"I",
|
|
"Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;",
|
|
")",
|
|
"Lcom/discord/widgets/voice/model/CallModel;"
|
|
}
|
|
.end annotation
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
move-object/from16 v3, p7
|
|
|
|
const/4 v1, 0x1
|
|
|
|
move-object/from16 v15, p8
|
|
|
|
invoke-static {v1, v15}, Lcom/discord/utilities/permissions/PermissionUtils;->can(ILjava/lang/Integer;)Z
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual/range {p6 .. p6}, Lkotlin/Pair;->component1()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
move-object v10, v4
|
|
|
|
check-cast v10, Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;
|
|
|
|
invoke-virtual/range {p6 .. p6}, Lkotlin/Pair;->component2()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
move-object v14, v4
|
|
|
|
check-cast v14, Lcom/discord/utilities/media/AudioOutputState;
|
|
|
|
invoke-interface/range {p7 .. p7}, Ljava/util/Map;->isEmpty()Z
|
|
|
|
move-result v4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
const/16 v17, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
invoke-interface/range {p7 .. p7}, Ljava/util/Map;->entrySet()Ljava/util/Set;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {v4}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v4
|
|
|
|
:cond_1
|
|
:goto_0
|
|
invoke-interface {v4}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_2
|
|
|
|
invoke-interface {v4}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Ljava/util/Map$Entry;
|
|
|
|
invoke-interface {v6}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
invoke-virtual {v6}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isConnected()Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_1
|
|
|
|
add-int/lit8 v5, v5, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
move/from16 v17, v5
|
|
|
|
:goto_1
|
|
sget-object v4, Lcom/discord/widgets/voice/model/CallModel$Companion$WhenMappings;->$EnumSwitchMapping$0:[I
|
|
|
|
invoke-virtual/range {p11 .. p11}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v5
|
|
|
|
aget v4, v4, v5
|
|
|
|
if-eq v4, v1, :cond_5
|
|
|
|
const/4 v1, 0x2
|
|
|
|
if-ne v4, v1, :cond_4
|
|
|
|
if-eqz p12, :cond_3
|
|
|
|
invoke-virtual/range {p12 .. p12}, Lcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;->getStream()Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelApplicationStream;->getOwnerId()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
const/4 v1, 0x0
|
|
|
|
:goto_2
|
|
invoke-direct {v0, v3, v1}, Lcom/discord/widgets/voice/model/CallModel$Companion;->createSpectatingListItems(Ljava/util/Map;Ljava/lang/Long;)Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
move-object/from16 v13, p1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_4
|
|
new-instance v1, Lw/g;
|
|
|
|
invoke-direct {v1}, Lw/g;-><init>()V
|
|
|
|
throw v1
|
|
|
|
:cond_5
|
|
move-object/from16 v13, p1
|
|
|
|
invoke-direct {v0, v13, v3, v2}, Lcom/discord/widgets/voice/model/CallModel$Companion;->createConnectedListItems(Lcom/discord/models/domain/ModelChannel;Ljava/util/Map;Z)Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
:goto_3
|
|
move-object v2, v1
|
|
|
|
new-instance v20, Lcom/discord/widgets/voice/model/CallModel;
|
|
|
|
move-object/from16 v1, v20
|
|
|
|
move-object/from16 v3, p7
|
|
|
|
move-wide/from16 v4, p2
|
|
|
|
move-wide/from16 v6, p4
|
|
|
|
move-object/from16 v8, p9
|
|
|
|
move-object/from16 v9, p10
|
|
|
|
move-object/from16 v11, p14
|
|
|
|
move/from16 v12, p15
|
|
|
|
move-object/from16 v13, p12
|
|
|
|
move/from16 v15, p13
|
|
|
|
move-object/from16 v16, p1
|
|
|
|
move-object/from16 v18, p8
|
|
|
|
move-object/from16 v19, p16
|
|
|
|
invoke-direct/range {v1 .. v19}, Lcom/discord/widgets/voice/model/CallModel;-><init>(Ljava/util/List;Ljava/util/Map;JJLjava/util/List;Lco/discord/media_engine/VideoInputDeviceDescription;Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;Lcom/discord/stores/StoreRtcConnection$RtcConnectionAnalyticsInfo;ILcom/discord/stores/StoreApplicationStreaming$ActiveApplicationStream;Lcom/discord/utilities/media/AudioOutputState;ZLcom/discord/models/domain/ModelChannel;ILjava/lang/Integer;Lcom/discord/stores/StoreAudioDevices$AudioDevicesState;)V
|
|
|
|
return-object v20
|
|
.end method
|
|
|
|
.method private final createConnectedListItems(Lcom/discord/models/domain/ModelChannel;Ljava/util/Map;Z)Ljava/util/List;
|
|
.locals 8
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;",
|
|
">;Z)",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;",
|
|
">;"
|
|
}
|
|
.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-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getType()I
|
|
|
|
move-result v3
|
|
|
|
const/4 v4, 0x1
|
|
|
|
if-eq v3, v4, :cond_7
|
|
|
|
invoke-interface {p2}, 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
|
|
|
|
:goto_0
|
|
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_1
|
|
|
|
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
invoke-virtual {v5}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isConnected()Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_0
|
|
|
|
invoke-virtual {v1, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {v2, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
invoke-interface {v1}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v3
|
|
|
|
xor-int/2addr v3, v4
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
new-instance v5, Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter$ListItemHeader;
|
|
|
|
const v6, 0x7f120aac
|
|
|
|
invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-direct {v5, v6}, Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter$ListItemHeader;-><init>(Ljava/lang/Integer;)V
|
|
|
|
invoke-virtual {v0, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
new-instance v5, Ljava/util/ArrayList;
|
|
|
|
const/16 v6, 0xa
|
|
|
|
invoke-static {v1, v6}, Le/k/a/c/e/p/g;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
move-result v6
|
|
|
|
invoke-direct {v5, v6}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
:goto_1
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_2
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
check-cast v6, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
new-instance v7, Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter$ListItemVoiceUser;
|
|
|
|
invoke-direct {v7, v6}, Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter$ListItemVoiceUser;-><init>(Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;)V
|
|
|
|
invoke-interface {v5, v7}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
invoke-static {}, Lcom/discord/widgets/voice/model/CallModel;->access$getUserItemsComparator$cp()Ljava/util/Comparator;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v5, v1}, Lw/q/l;->sortedWith(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z
|
|
|
|
:cond_3
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getType()I
|
|
|
|
move-result v1
|
|
|
|
const/4 v5, 0x2
|
|
|
|
if-eq v1, v5, :cond_5
|
|
|
|
invoke-interface {v2}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result p1
|
|
|
|
xor-int/2addr p1, v4
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
sget-object p2, Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter$ListItemDivider;->INSTANCE:Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter$ListItemDivider;
|
|
|
|
invoke-virtual {v0, p2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
:cond_4
|
|
if-eqz p1, :cond_7
|
|
|
|
new-instance p1, Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter$ListItemHeader;
|
|
|
|
const p2, 0x7f120d45
|
|
|
|
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter$ListItemHeader;-><init>(Ljava/lang/Integer;)V
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
:goto_2
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_7
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object p2
|
|
|
|
check-cast p2, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
new-instance p3, Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter$ListItemVoiceUser;
|
|
|
|
invoke-direct {p3, p2}, Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter$ListItemVoiceUser;-><init>(Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;)V
|
|
|
|
invoke-interface {v0, p3}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_2
|
|
|
|
:cond_5
|
|
if-eqz p3, :cond_7
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getUserLimit()I
|
|
|
|
move-result p3
|
|
|
|
if-eqz p3, :cond_6
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getUserLimit()I
|
|
|
|
move-result p3
|
|
|
|
invoke-interface {p2}, Ljava/util/Map;->size()I
|
|
|
|
move-result p2
|
|
|
|
if-le p3, p2, :cond_7
|
|
|
|
:cond_6
|
|
new-instance p2, Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter$ListItemInvite;
|
|
|
|
invoke-direct {p2, p1}, Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter$ListItemInvite;-><init>(Lcom/discord/models/domain/ModelChannel;)V
|
|
|
|
invoke-virtual {v0, p2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
:cond_7
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final createSpectatingListItems(Ljava/util/Map;Ljava/lang/Long;)Ljava/util/List;
|
|
.locals 10
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;",
|
|
">;",
|
|
"Ljava/lang/Long;",
|
|
")",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/utilities/mg_recycler/MGRecyclerDataPayload;",
|
|
">;"
|
|
}
|
|
.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
|
|
|
|
xor-int/lit8 p1, p1, 0x1
|
|
|
|
new-instance v2, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
new-instance v3, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
:goto_1
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_5
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
invoke-virtual {v4}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->getApplicationStream()Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
move-result-object v5
|
|
|
|
if-eqz v5, :cond_3
|
|
|
|
invoke-virtual {v4}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->getUser()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v5
|
|
|
|
if-nez p2, :cond_2
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
invoke-virtual {p2}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v7
|
|
|
|
cmp-long v9, v5, v7
|
|
|
|
if-nez v9, :cond_3
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
:goto_2
|
|
invoke-virtual {v4}, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;->isSpectating()Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_4
|
|
|
|
invoke-virtual {v2, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
invoke-virtual {v3, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_1
|
|
|
|
:cond_5
|
|
if-eqz p1, :cond_8
|
|
|
|
new-instance p1, Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter$ListItemSpectatorsHeader;
|
|
|
|
invoke-virtual {v2}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result p2
|
|
|
|
invoke-direct {p1, p2}, Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter$ListItemSpectatorsHeader;-><init>(I)V
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
new-instance p1, Ljava/util/ArrayList;
|
|
|
|
const/16 p2, 0xa
|
|
|
|
invoke-static {v2, p2}, Le/k/a/c/e/p/g;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
move-result v1
|
|
|
|
invoke-direct {p1, v1}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
:goto_3
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_6
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;
|
|
|
|
new-instance v4, Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter$ListItemVoiceUser;
|
|
|
|
invoke-direct {v4, v2}, Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter$ListItemVoiceUser;-><init>(Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;)V
|
|
|
|
invoke-interface {p1, v4}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_3
|
|
|
|
:cond_6
|
|
invoke-static {}, Lcom/discord/widgets/voice/model/CallModel;->access$getUserItemsComparator$cp()Ljava/util/Comparator;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {p1, v1}, Lw/q/l;->sortedWith(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z
|
|
|
|
invoke-interface {v3}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result p1
|
|
|
|
xor-int/lit8 p1, p1, 0x1
|
|
|
|
if-eqz p1, :cond_8
|
|
|
|
new-instance p1, Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter$ListItemHeader;
|
|
|
|
const v1, 0x7f120aac
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {p1, v1}, Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter$ListItemHeader;-><init>(Ljava/lang/Integer;)V
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
new-instance p1, Ljava/util/ArrayList;
|
|
|
|
invoke-static {v3, p2}, Le/k/a/c/e/p/g;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
move-result p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
invoke-interface {v3}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p2
|
|
|
|
:goto_4
|
|
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_7
|
|
|
|
invoke-interface {p2}, 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/fullscreen/CallParticipantsAdapter$ListItemVoiceUser;
|
|
|
|
invoke-direct {v2, v1}, Lcom/discord/widgets/voice/fullscreen/CallParticipantsAdapter$ListItemVoiceUser;-><init>(Lcom/discord/stores/StoreVoiceParticipants$VoiceUser;)V
|
|
|
|
invoke-interface {p1, v2}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_4
|
|
|
|
:cond_7
|
|
invoke-static {}, Lcom/discord/widgets/voice/model/CallModel;->access$getUserItemsComparator$cp()Ljava/util/Comparator;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p1, p2}, Lw/q/l;->sortedWith(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z
|
|
|
|
:cond_8
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static synthetic get$default(Lcom/discord/widgets/voice/model/CallModel$Companion;JLcom/discord/widgets/voice/model/CallModel$ParticipantsType;ILjava/lang/Object;)Lrx/Observable;
|
|
.locals 0
|
|
|
|
and-int/lit8 p4, p4, 0x2
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
sget-object p3, Lcom/discord/widgets/voice/model/CallModel$ParticipantsType;->CALLERS:Lcom/discord/widgets/voice/model/CallModel$ParticipantsType;
|
|
|
|
:cond_0
|
|
invoke-virtual {p0, p1, p2, p3}, Lcom/discord/widgets/voice/model/CallModel$Companion;->get(JLcom/discord/widgets/voice/model/CallModel$ParticipantsType;)Lrx/Observable;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private final observeChunk(Lcom/discord/models/domain/ModelChannel;)Lrx/Observable;
|
|
.locals 10
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
")",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/voice/model/CallModel$Companion$Chunk;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getUsers()Lcom/discord/stores/StoreUser;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreUser;->observeMeId()Lrx/Observable;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getVoiceChannelSelected()Lcom/discord/stores/StoreVoiceChannelSelected;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreVoiceChannelSelected;->getTimeChannelSelected()Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getMediaSettings()Lcom/discord/stores/StoreMediaSettings;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreMediaSettings;->getVoiceConfiguration()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v3, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v3}, Lcom/discord/stores/StoreStream$Companion;->getAudioDevices()Lcom/discord/stores/StoreAudioDevices;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Lcom/discord/stores/StoreAudioDevices;->getAudioDevicesState()Lrx/Observable;
|
|
|
|
move-result-object v3
|
|
|
|
sget-object v4, Lcom/discord/widgets/voice/model/CallModel$Companion$observeChunk$1;->INSTANCE:Lcom/discord/widgets/voice/model/CallModel$Companion$observeChunk$1;
|
|
|
|
invoke-static {v0, v3, v4}, Lrx/Observable;->a(Lrx/Observable;Lrx/Observable;Lrx/functions/Func2;)Lrx/Observable;
|
|
|
|
move-result-object v3
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getVoiceParticipants()Lcom/discord/stores/StoreVoiceParticipants;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-virtual {v0, v4, v5}, Lcom/discord/stores/StoreVoiceParticipants;->get(J)Lrx/Observable;
|
|
|
|
move-result-object v4
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getPermissions()Lcom/discord/stores/StorePermissions;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v5
|
|
|
|
invoke-virtual {v0, v5, v6}, Lcom/discord/stores/StorePermissions;->getForChannel(J)Lrx/Observable;
|
|
|
|
move-result-object v5
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getMediaEngine()Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreMediaEngine;->getVideoInputDevices()Lrx/Observable;
|
|
|
|
move-result-object v6
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getMediaEngine()Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreMediaEngine;->getSelectedVideoInputDevice()Lrx/Observable;
|
|
|
|
move-result-object v7
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getVideoSupport()Lcom/discord/stores/StoreVideoSupport;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreVideoSupport;->get()Lrx/Observable;
|
|
|
|
move-result-object v8
|
|
|
|
new-instance v9, Lcom/discord/widgets/voice/model/CallModel$Companion$observeChunk$2;
|
|
|
|
invoke-direct {v9, p1}, Lcom/discord/widgets/voice/model/CallModel$Companion$observeChunk$2;-><init>(Lcom/discord/models/domain/ModelChannel;)V
|
|
|
|
invoke-static/range {v1 .. v9}, Lrx/Observable;->a(Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/functions/Func8;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "Observable\n .co\u2026 )\n }"
|
|
|
|
invoke-static {p1, v0}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final get(JLcom/discord/widgets/voice/model/CallModel$ParticipantsType;)Lrx/Observable;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(J",
|
|
"Lcom/discord/widgets/voice/model/CallModel$ParticipantsType;",
|
|
")",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/voice/model/CallModel;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getChannels()Lcom/discord/stores/StoreChannels;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1, p2}, Lcom/discord/stores/StoreChannels;->get(J)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance p2, Lcom/discord/widgets/voice/model/CallModel$Companion$get$1;
|
|
|
|
invoke-direct {p2, p3}, Lcom/discord/widgets/voice/model/CallModel$Companion$get$1;-><init>(Lcom/discord/widgets/voice/model/CallModel$ParticipantsType;)V
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->k(Le0/l/i;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
const-string p2, "StoreStream\n .g\u2026 }\n }"
|
|
|
|
invoke-static {p1, p2}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
const-string p1, "participantsType"
|
|
|
|
invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|