.class public final Lcom/discord/stores/StoreVoiceChannelSelected; .super Lcom/discord/stores/Store; .source "StoreVoiceChannelSelected.kt" # interfaces .implements Lcom/discord/stores/DispatchHandler; # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult;, Lcom/discord/stores/StoreVoiceChannelSelected$Companion; } .end annotation # static fields .field public static final Companion:Lcom/discord/stores/StoreVoiceChannelSelected$Companion; .field public static final VOICE_CHANNEL_ID_NONE:J # instance fields .field public final clock:Lcom/discord/utilities/time/Clock; .field public final dispatcher:Lcom/discord/stores/Dispatcher; .field public final id:Lrx/Observable; .annotation system Ldalvik/annotation/Signature; value = { "Lrx/Observable<", "Ljava/lang/Long;", ">;" } .end annotation .end field .field public isDirty:Z .field public lastSelectedVoiceChannelId:J .field public preselectedVoiceChannelId:Ljava/lang/Long; .field public selectedVoiceChannelId:J .field public final selectedVoiceChannelIdPublisher:Lrx/subjects/BehaviorSubject; .annotation system Ldalvik/annotation/Signature; value = { "Lrx/subjects/BehaviorSubject<", "Ljava/lang/Long;", ">;" } .end annotation .end field .field public sessionId:Ljava/lang/String; .field public final stream:Lcom/discord/stores/StoreStream; .field public final timeChannelSelectedMs:Lrx/Observable; .annotation system Ldalvik/annotation/Signature; value = { "Lrx/Observable<", "Ljava/lang/Long;", ">;" } .end annotation .end field .field public final timeSelectedMsPublisher:Lrx/subjects/BehaviorSubject; .annotation system Ldalvik/annotation/Signature; value = { "Lrx/subjects/BehaviorSubject<", "Ljava/lang/Long;", ">;" } .end annotation .end field # direct methods .method public static constructor ()V .locals 2 new-instance v0, Lcom/discord/stores/StoreVoiceChannelSelected$Companion; const/4 v1, 0x0 invoke-direct {v0, v1}, Lcom/discord/stores/StoreVoiceChannelSelected$Companion;->(Lkotlin/jvm/internal/DefaultConstructorMarker;)V sput-object v0, Lcom/discord/stores/StoreVoiceChannelSelected;->Companion:Lcom/discord/stores/StoreVoiceChannelSelected$Companion; return-void .end method .method public constructor (Lcom/discord/stores/StoreStream;Lcom/discord/stores/Dispatcher;Lcom/discord/utilities/time/Clock;)V .locals 1 const-string/jumbo v0, "stream" invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "dispatcher" invoke-static {p2, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "clock" invoke-static {p3, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V invoke-direct {p0}, Lcom/discord/stores/Store;->()V iput-object p1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->stream:Lcom/discord/stores/StoreStream; iput-object p2, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->dispatcher:Lcom/discord/stores/Dispatcher; iput-object p3, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->clock:Lcom/discord/utilities/time/Clock; const-wide/16 p1, 0x0 invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long; move-result-object p1 invoke-static {p1}, Lrx/subjects/BehaviorSubject;->h0(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject; move-result-object p2 iput-object p2, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->selectedVoiceChannelIdPublisher:Lrx/subjects/BehaviorSubject; invoke-static {p1}, Lrx/subjects/BehaviorSubject;->h0(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject; move-result-object p1 iput-object p1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->timeSelectedMsPublisher:Lrx/subjects/BehaviorSubject; iget-object p1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->selectedVoiceChannelIdPublisher:Lrx/subjects/BehaviorSubject; const-string p2, "selectedVoiceChannelIdPublisher" invoke-static {p1, p2}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable; move-result-object p1 invoke-virtual {p1}, Lrx/Observable;->q()Lrx/Observable; move-result-object p1 const-string p2, "selectedVoiceChannelIdPu\u2026 .distinctUntilChanged()" invoke-static {p1, p2}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V iput-object p1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->id:Lrx/Observable; iget-object p1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->timeSelectedMsPublisher:Lrx/subjects/BehaviorSubject; const-string/jumbo p2, "timeSelectedMsPublisher" invoke-static {p1, p2}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable; move-result-object p1 invoke-virtual {p1}, Lrx/Observable;->q()Lrx/Observable; move-result-object p1 const-string/jumbo p2, "timeSelectedMsPublisher\n\u2026 .distinctUntilChanged()" invoke-static {p1, p2}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V iput-object p1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->timeChannelSelectedMs:Lrx/Observable; return-void .end method .method public static final synthetic access$clearInternal(Lcom/discord/stores/StoreVoiceChannelSelected;)V .locals 0 invoke-direct {p0}, Lcom/discord/stores/StoreVoiceChannelSelected;->clearInternal()V return-void .end method .method public static final synthetic access$getStream$p(Lcom/discord/stores/StoreVoiceChannelSelected;)Lcom/discord/stores/StoreStream; .locals 0 iget-object p0, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->stream:Lcom/discord/stores/StoreStream; return-object p0 .end method .method private final clearInternal()V .locals 6 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation const-wide/16 v1, 0x0 const/4 v3, 0x0 const/4 v4, 0x2 const/4 v5, 0x0 move-object v0, p0 invoke-static/range {v0 .. v5}, Lcom/discord/stores/StoreVoiceChannelSelected;->selectVoiceChannel$default(Lcom/discord/stores/StoreVoiceChannelSelected;JZILjava/lang/Object;)Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult; return-void .end method .method private final getJoinability(J)Lcom/discord/utilities/voice/VoiceChannelJoinability; .locals 10 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation iget-object v0, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->stream:Lcom/discord/stores/StoreStream; invoke-virtual {v0}, Lcom/discord/stores/StoreStream;->getChannels$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreChannels; move-result-object v0 iget-object v1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->stream:Lcom/discord/stores/StoreStream; invoke-virtual {v1}, Lcom/discord/stores/StoreStream;->getGuilds$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreGuilds; move-result-object v1 iget-object v2, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->stream:Lcom/discord/stores/StoreStream; invoke-virtual {v2}, Lcom/discord/stores/StoreStream;->getPermissions$app_productionDiscordExternalRelease()Lcom/discord/stores/StorePermissions; move-result-object v2 iget-object v3, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->stream:Lcom/discord/stores/StoreStream; invoke-virtual {v3}, Lcom/discord/stores/StoreStream;->getVoiceStates$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreVoiceStates; move-result-object v3 invoke-virtual {v0, p1, p2}, Lcom/discord/stores/StoreChannels;->getChannel$app_productionDiscordExternalRelease(J)Lcom/discord/models/domain/ModelChannel; move-result-object v5 if-eqz v5, :cond_3 invoke-virtual {v3}, Lcom/discord/stores/StoreVoiceStates;->getMediaStatesBlocking()Ljava/util/Map; move-result-object v0 invoke-virtual {v5}, Lcom/discord/models/domain/ModelChannel;->getGuildId()Ljava/lang/Long; move-result-object v3 invoke-interface {v0, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/util/Map; if-eqz v0, :cond_0 goto :goto_0 :cond_0 sget-object v0, Lz/i/m;->d:Lz/i/m; :goto_0 invoke-virtual {v2}, Lcom/discord/stores/StorePermissions;->getPermissionsForChannels$app_productionDiscordExternalRelease()Ljava/util/Map; move-result-object v2 invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long; move-result-object p1 invoke-interface {v2, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object p1 move-object v7, p1 check-cast v7, Ljava/lang/Long; invoke-virtual {v1}, Lcom/discord/stores/StoreGuilds;->getGuilds()Ljava/util/Map; move-result-object p1 invoke-virtual {v5}, Lcom/discord/models/domain/ModelChannel;->getGuildId()Ljava/lang/Long; move-result-object p2 invoke-interface {p1, p2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object p1 check-cast p1, Lcom/discord/models/domain/ModelGuild; if-eqz p1, :cond_1 invoke-direct {p0, p1}, Lcom/discord/stores/StoreVoiceChannelSelected;->getVerificationLevelTriggered(Lcom/discord/models/domain/ModelGuild;)I move-result p2 move v9, p2 goto :goto_1 :cond_1 const/4 p2, 0x0 const/4 v9, 0x0 :goto_1 sget-object v4, Lcom/discord/utilities/voice/VoiceChannelJoinabilityUtils;->INSTANCE:Lcom/discord/utilities/voice/VoiceChannelJoinabilityUtils; invoke-interface {v0}, Ljava/util/Map;->values()Ljava/util/Collection; move-result-object v6 if-eqz p1, :cond_2 invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getMaxVideoChannelUsers()Ljava/lang/Integer; move-result-object p1 goto :goto_2 :cond_2 const/4 p1, 0x0 :goto_2 move-object v8, p1 invoke-virtual/range {v4 .. v9}, Lcom/discord/utilities/voice/VoiceChannelJoinabilityUtils;->getJoinability(Lcom/discord/models/domain/ModelChannel;Ljava/util/Collection;Ljava/lang/Long;Ljava/lang/Integer;I)Lcom/discord/utilities/voice/VoiceChannelJoinability; move-result-object p1 return-object p1 :cond_3 sget-object p1, Lcom/discord/utilities/voice/VoiceChannelJoinability;->CHANNEL_DOES_NOT_EXIST:Lcom/discord/utilities/voice/VoiceChannelJoinability; return-object p1 .end method .method private final getVerificationLevelTriggered(Lcom/discord/models/domain/ModelGuild;)I .locals 10 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation iget-object v0, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->stream:Lcom/discord/stores/StoreStream; invoke-virtual {v0}, Lcom/discord/stores/StoreStream;->getGuilds$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreGuilds; move-result-object v0 iget-object v1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->stream:Lcom/discord/stores/StoreStream; invoke-virtual {v1}, Lcom/discord/stores/StoreStream;->getUsers$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreUser; move-result-object v1 invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getVerificationLevel()I move-result v2 invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getMembers()Ljava/util/Map; move-result-object v3 invoke-virtual {v1}, Lcom/discord/stores/StoreUser;->getMe()Lcom/discord/models/domain/ModelUser$Me; move-result-object v1 if-eqz v1, :cond_0 if-eqz v3, :cond_0 invoke-virtual {v1}, Lcom/discord/models/domain/ModelUser;->getId()J move-result-wide v4 invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long; move-result-object v4 invoke-interface {v3, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v3 check-cast v3, Lcom/discord/models/domain/ModelGuildMember; goto :goto_0 :cond_0 const/4 v3, 0x0 :goto_0 const/4 v4, 0x1 const/4 v5, 0x0 if-eqz v1, :cond_1 invoke-virtual {v1}, Lcom/discord/models/domain/ModelUser;->getId()J move-result-wide v6 invoke-virtual {p1, v6, v7}, Lcom/discord/models/domain/ModelGuild;->isOwner(J)Z move-result v6 if-eqz v6, :cond_1 const/4 v6, 0x1 goto :goto_1 :cond_1 const/4 v6, 0x0 :goto_1 if-eqz v3, :cond_2 invoke-virtual {v3}, Lcom/discord/models/domain/ModelGuildMember;->getRoles()Ljava/util/List; move-result-object v3 invoke-interface {v3}, Ljava/util/List;->size()I move-result v3 if-lez v3, :cond_2 const/4 v3, 0x1 goto :goto_2 :cond_2 const/4 v3, 0x0 :goto_2 if-eqz v1, :cond_3 invoke-virtual {v1}, Lcom/discord/models/domain/ModelUser;->hasPhone()Z move-result v7 if-ne v7, v4, :cond_3 const/4 v7, 0x1 goto :goto_3 :cond_3 const/4 v7, 0x0 :goto_3 invoke-virtual {v0}, Lcom/discord/stores/StoreGuilds;->getGuildsJoinedAt()Ljava/util/Map; move-result-object v0 invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J move-result-wide v8 invoke-static {v8, v9}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long; move-result-object p1 invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object p1 check-cast p1, Ljava/lang/Long; if-nez v6, :cond_e if-nez v3, :cond_e if-eqz v7, :cond_4 goto :goto_6 :cond_4 if-eq v2, v4, :cond_b const/4 v0, 0x2 if-eq v2, v0, :cond_8 const/4 v0, 0x3 if-eq v2, v0, :cond_6 const/4 p1, 0x4 if-eq v2, p1, :cond_5 return v5 :cond_5 return p1 :cond_6 if-eqz p1, :cond_7 invoke-virtual {p1}, Ljava/lang/Long;->longValue()J move-result-wide v1 invoke-static {v1, v2}, Lcom/discord/models/domain/ModelGuildMember;->isGuildMemberOldEnough(J)Z move-result p1 if-nez p1, :cond_7 return v0 :cond_7 return v5 :cond_8 if-eqz v1, :cond_a invoke-virtual {v1}, Lcom/discord/models/domain/ModelUser;->isAccountOldEnough()Z move-result p1 if-nez p1, :cond_9 goto :goto_4 :cond_9 return v5 :cond_a :goto_4 return v0 :cond_b if-eqz v1, :cond_d invoke-virtual {v1}, Lcom/discord/models/domain/ModelUser$Me;->isVerified()Z move-result p1 if-nez p1, :cond_c goto :goto_5 :cond_c return v5 :cond_d :goto_5 return v4 :cond_e :goto_6 return v5 .end method .method private final selectVoiceChannel(JZ)Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult; .locals 11 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation iget-object v0, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->sessionId:Ljava/lang/String; if-nez v0, :cond_0 invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long; move-result-object p1 iput-object p1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->preselectedVoiceChannelId:Ljava/lang/Long; sget-object p1, Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult;->DEFERRED_UNTIL_SESSION_START:Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult; return-object p1 :cond_0 const/4 v0, 0x0 iput-object v0, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->preselectedVoiceChannelId:Ljava/lang/Long; iget-wide v0, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->selectedVoiceChannelId:J cmp-long v2, p1, v0 if-nez v2, :cond_1 sget-object p1, Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult;->ALREADY_CONNECTED:Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult; return-object p1 :cond_1 invoke-direct {p0, p1, p2}, Lcom/discord/stores/StoreVoiceChannelSelected;->getJoinability(J)Lcom/discord/utilities/voice/VoiceChannelJoinability; move-result-object v0 invoke-virtual {v0}, Ljava/lang/Enum;->ordinal()I move-result v1 const/4 v2, 0x0 const/4 v3, 0x4 const/4 v4, 0x3 const/4 v5, 0x2 const/4 v6, 0x1 if-eqz v1, :cond_4 if-eq v1, v6, :cond_5 if-eq v1, v5, :cond_3 if-eq v1, v4, :cond_5 if-ne v1, v3, :cond_2 goto :goto_0 :cond_2 new-instance p1, Lkotlin/NoWhenBranchMatchedException; invoke-direct {p1}, Lkotlin/NoWhenBranchMatchedException;->()V throw p1 :cond_3 :goto_0 const/4 p3, 0x0 goto :goto_1 :cond_4 const/4 p3, 0x1 :cond_5 :goto_1 iget-wide v7, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->selectedVoiceChannelId:J const-wide/16 v9, 0x0 if-eqz p3, :cond_6 iput-wide p1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->selectedVoiceChannelId:J cmp-long v1, p1, v9 if-lez v1, :cond_7 iput-wide p1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->lastSelectedVoiceChannelId:J goto :goto_2 :cond_6 iput-wide v9, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->selectedVoiceChannelId:J :cond_7 :goto_2 iget-wide p1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->selectedVoiceChannelId:J cmp-long v1, v7, p1 if-eqz v1, :cond_8 const/4 v2, 0x1 :cond_8 iput-boolean v2, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->isDirty:Z if-eqz p3, :cond_9 sget-object p1, Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult;->SUCCESS:Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult; goto :goto_3 :cond_9 invoke-virtual {v0}, Ljava/lang/Enum;->ordinal()I move-result p1 if-eqz p1, :cond_e if-eq p1, v6, :cond_d if-eq p1, v5, :cond_c if-eq p1, v4, :cond_b if-ne p1, v3, :cond_a sget-object p1, Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult;->FAILED_CHANNEL_DOES_NOT_EXIST:Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult; goto :goto_3 :cond_a new-instance p1, Lkotlin/NoWhenBranchMatchedException; invoke-direct {p1}, Lkotlin/NoWhenBranchMatchedException;->()V throw p1 :cond_b sget-object p1, Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult;->FAILED_CHANNEL_FULL:Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult; goto :goto_3 :cond_c sget-object p1, Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult;->FAILED_GUILD_VIDEO_AT_CAPACITY:Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult; goto :goto_3 :cond_d sget-object p1, Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult;->FAILED_PERMISSIONS_MISSING:Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult; goto :goto_3 :cond_e sget-object p1, Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult;->SUCCESS:Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult; :goto_3 return-object p1 .end method .method public static synthetic selectVoiceChannel$default(Lcom/discord/stores/StoreVoiceChannelSelected;JZILjava/lang/Object;)Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult; .locals 0 and-int/lit8 p4, p4, 0x2 if-eqz p4, :cond_0 const/4 p3, 0x0 :cond_0 invoke-direct {p0, p1, p2, p3}, Lcom/discord/stores/StoreVoiceChannelSelected;->selectVoiceChannel(JZ)Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult; move-result-object p0 return-object p0 .end method .method private final validateSelectedVoiceChannel()V .locals 5 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation iget-wide v0, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->selectedVoiceChannelId:J const-wide/16 v2, 0x0 cmp-long v4, v0, v2 if-nez v4, :cond_0 return-void :cond_0 iget-object v2, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->stream:Lcom/discord/stores/StoreStream; invoke-virtual {v2}, Lcom/discord/stores/StoreStream;->getChannels$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreChannels; move-result-object v2 iget-wide v3, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->selectedVoiceChannelId:J invoke-virtual {v2, v3, v4}, Lcom/discord/stores/StoreChannels;->getChannel$app_productionDiscordExternalRelease(J)Lcom/discord/models/domain/ModelChannel; move-result-object v2 if-nez v2, :cond_1 invoke-direct {p0}, Lcom/discord/stores/StoreVoiceChannelSelected;->clearInternal()V :cond_1 iget-wide v2, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->selectedVoiceChannelId:J cmp-long v4, v2, v0 if-eqz v4, :cond_2 const/4 v0, 0x1 goto :goto_0 :cond_2 const/4 v0, 0x0 :goto_0 iput-boolean v0, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->isDirty:Z return-void .end method # virtual methods .method public final clear()V .locals 2 iget-object v0, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->dispatcher:Lcom/discord/stores/Dispatcher; new-instance v1, Lcom/discord/stores/StoreVoiceChannelSelected$clear$1; invoke-direct {v1, p0}, Lcom/discord/stores/StoreVoiceChannelSelected$clear$1;->(Lcom/discord/stores/StoreVoiceChannelSelected;)V invoke-virtual {v0, v1}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V return-void .end method .method public final get()Lrx/Observable; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lrx/Observable<", "Lcom/discord/models/domain/ModelChannel;", ">;" } .end annotation iget-object v0, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->id:Lrx/Observable; new-instance v1, Lcom/discord/stores/StoreVoiceChannelSelected$get$1; invoke-direct {v1, p0}, Lcom/discord/stores/StoreVoiceChannelSelected$get$1;->(Lcom/discord/stores/StoreVoiceChannelSelected;)V invoke-virtual {v0, v1}, Lrx/Observable;->U(Li0/k/b;)Lrx/Observable; move-result-object v0 invoke-virtual {v0}, Lrx/Observable;->q()Lrx/Observable; move-result-object v0 const-string v1, "id\n .switchMap \u2026 .distinctUntilChanged()" invoke-static {v0, v1}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V return-object v0 .end method .method public final getId()Lrx/Observable; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lrx/Observable<", "Ljava/lang/Long;", ">;" } .end annotation iget-object v0, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->id:Lrx/Observable; return-object v0 .end method .method public final getLastSelectedVoiceChannelId$app_productionDiscordExternalRelease()J .locals 2 iget-wide v0, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->lastSelectedVoiceChannelId:J return-wide v0 .end method .method public final getSelectedVoiceChannelId$app_productionDiscordExternalRelease()J .locals 2 iget-wide v0, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->selectedVoiceChannelId:J return-wide v0 .end method .method public final getTimeChannelSelectedMs()Lrx/Observable; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lrx/Observable<", "Ljava/lang/Long;", ">;" } .end annotation iget-object v0, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->timeChannelSelectedMs:Lrx/Observable; return-object v0 .end method .method public final handleAuthToken(Ljava/lang/String;)V .locals 0 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation if-nez p1, :cond_0 invoke-direct {p0}, Lcom/discord/stores/StoreVoiceChannelSelected;->clearInternal()V :cond_0 return-void .end method .method public final handleChannelCreated()V .locals 0 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation invoke-direct {p0}, Lcom/discord/stores/StoreVoiceChannelSelected;->validateSelectedVoiceChannel()V return-void .end method .method public final handleChannelDeleted()V .locals 0 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation invoke-direct {p0}, Lcom/discord/stores/StoreVoiceChannelSelected;->validateSelectedVoiceChannel()V return-void .end method .method public final handleConnectionOpen(Lcom/discord/models/domain/ModelPayload;)V .locals 2 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation const-string v0, "payload" invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getSessionId()Ljava/lang/String; move-result-object p1 iput-object p1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->sessionId:Ljava/lang/String; iget-object p1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->preselectedVoiceChannelId:Ljava/lang/Long; if-eqz p1, :cond_0 invoke-virtual {p1}, Ljava/lang/Number;->longValue()J move-result-wide v0 invoke-virtual {p0, v0, v1}, Lcom/discord/stores/StoreVoiceChannelSelected;->set(J)Lrx/Observable; :cond_0 return-void .end method .method public final handleGuildMemberAdd(Lcom/discord/models/domain/ModelGuildMember;)V .locals 3 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation const-string v0, "member" invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildMember;->getUser()Lcom/discord/models/domain/ModelUser; move-result-object p1 const/4 v0, 0x0 if-eqz p1, :cond_0 invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getId()J move-result-wide v1 invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long; move-result-object p1 goto :goto_0 :cond_0 move-object p1, v0 :goto_0 iget-object v1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->stream:Lcom/discord/stores/StoreStream; invoke-virtual {v1}, Lcom/discord/stores/StoreStream;->getUsers$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreUser; move-result-object v1 invoke-virtual {v1}, Lcom/discord/stores/StoreUser;->getMeInternal$app_productionDiscordExternalRelease()Lcom/discord/models/domain/ModelUser$Me; move-result-object v1 if-eqz v1, :cond_1 invoke-virtual {v1}, Lcom/discord/models/domain/ModelUser;->getId()J move-result-wide v0 invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long; move-result-object v0 :cond_1 invoke-static {p1, v0}, Lz/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result p1 if-eqz p1, :cond_2 invoke-direct {p0}, Lcom/discord/stores/StoreVoiceChannelSelected;->validateSelectedVoiceChannel()V :cond_2 return-void .end method .method public final handleGuildRemove()V .locals 0 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation invoke-direct {p0}, Lcom/discord/stores/StoreVoiceChannelSelected;->validateSelectedVoiceChannel()V return-void .end method .method public final handleGuildRoleAdd()V .locals 0 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation invoke-direct {p0}, Lcom/discord/stores/StoreVoiceChannelSelected;->validateSelectedVoiceChannel()V return-void .end method .method public final handleGuildRoleRemove()V .locals 0 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation invoke-direct {p0}, Lcom/discord/stores/StoreVoiceChannelSelected;->validateSelectedVoiceChannel()V return-void .end method .method public final handleStreamTargeted(Ljava/lang/String;)V .locals 6 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation const-string/jumbo v0, "streamKey" invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V 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 p1 invoke-virtual {p1}, Lcom/discord/models/domain/ModelApplicationStream;->getChannelId()J move-result-wide v1 const/4 v3, 0x0 const/4 v4, 0x2 const/4 v5, 0x0 move-object v0, p0 invoke-static/range {v0 .. v5}, Lcom/discord/stores/StoreVoiceChannelSelected;->selectVoiceChannel$default(Lcom/discord/stores/StoreVoiceChannelSelected;JZILjava/lang/Object;)Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult; return-void .end method .method public final handleVoiceStateUpdates(Lcom/discord/models/domain/ModelVoice$State;)V .locals 7 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation const-string/jumbo v0, "voiceState" invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget-object v0, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->stream:Lcom/discord/stores/StoreStream; invoke-virtual {v0}, Lcom/discord/stores/StoreStream;->getUsers$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreUser; move-result-object v0 invoke-virtual {v0}, Lcom/discord/stores/StoreUser;->getMeInternal$app_productionDiscordExternalRelease()Lcom/discord/models/domain/ModelUser$Me; move-result-object v0 if-eqz v0, :cond_0 invoke-virtual {v0}, Lcom/discord/models/domain/ModelUser;->getId()J move-result-wide v0 invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long; move-result-object v0 goto :goto_0 :cond_0 const/4 v0, 0x0 :goto_0 invoke-virtual {p1}, Lcom/discord/models/domain/ModelVoice$State;->getUserId()J move-result-wide v1 if-nez v0, :cond_1 goto :goto_1 :cond_1 invoke-virtual {v0}, Ljava/lang/Long;->longValue()J move-result-wide v3 cmp-long v0, v3, v1 if-eqz v0, :cond_2 :goto_1 return-void :cond_2 iget-object v0, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->stream:Lcom/discord/stores/StoreStream; invoke-virtual {v0}, Lcom/discord/stores/StoreStream;->getChannels$app_productionDiscordExternalRelease()Lcom/discord/stores/StoreChannels; move-result-object v0 iget-wide v1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->selectedVoiceChannelId:J invoke-virtual {v0, v1, v2}, Lcom/discord/stores/StoreChannels;->getChannel$app_productionDiscordExternalRelease(J)Lcom/discord/models/domain/ModelChannel; move-result-object v0 if-eqz v0, :cond_7 invoke-virtual {v0}, Lcom/discord/models/domain/ModelChannel;->getGuildId()Ljava/lang/Long; move-result-object v0 invoke-virtual {v0}, Ljava/lang/Long;->longValue()J move-result-wide v0 invoke-virtual {p1}, Lcom/discord/models/domain/ModelVoice$State;->getGuildId()J move-result-wide v2 cmp-long v4, v0, v2 if-eqz v4, :cond_3 goto :goto_3 :cond_3 invoke-virtual {p1}, Lcom/discord/models/domain/ModelVoice$State;->getChannelId()Ljava/lang/Long; move-result-object v0 iget-wide v1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->selectedVoiceChannelId:J const/4 v3, 0x1 if-nez v0, :cond_4 goto :goto_2 :cond_4 invoke-virtual {v0}, Ljava/lang/Long;->longValue()J move-result-wide v4 cmp-long v6, v4, v1 if-eqz v6, :cond_6 :goto_2 invoke-virtual {p1}, Lcom/discord/models/domain/ModelVoice$State;->getSessionId()Ljava/lang/String; move-result-object v1 iget-object v2, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->sessionId:Ljava/lang/String; invoke-static {v1, v2}, Lz/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result v1 if-eqz v1, :cond_6 if-eqz v0, :cond_5 invoke-virtual {v0}, Ljava/lang/Long;->longValue()J move-result-wide v0 invoke-direct {p0, v0, v1, v3}, Lcom/discord/stores/StoreVoiceChannelSelected;->selectVoiceChannel(JZ)Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult; goto :goto_3 :cond_5 invoke-direct {p0}, Lcom/discord/stores/StoreVoiceChannelSelected;->clearInternal()V goto :goto_3 :cond_6 invoke-virtual {p1}, Lcom/discord/models/domain/ModelVoice$State;->getSessionId()Ljava/lang/String; move-result-object p1 iget-object v0, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->sessionId:Ljava/lang/String; invoke-static {p1, v0}, Lz/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result p1 xor-int/2addr p1, v3 if-eqz p1, :cond_7 invoke-direct {p0}, Lcom/discord/stores/StoreVoiceChannelSelected;->clearInternal()V :cond_7 :goto_3 return-void .end method .method public onDispatchEnded()V .locals 6 .annotation runtime Lcom/discord/stores/StoreThread; .end annotation iget-boolean v0, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->isDirty:Z if-eqz v0, :cond_1 iget-object v0, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->selectedVoiceChannelIdPublisher:Lrx/subjects/BehaviorSubject; iget-wide v1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->selectedVoiceChannelId:J invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long; move-result-object v1 invoke-virtual {v0, v1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V iget-object v0, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->timeSelectedMsPublisher:Lrx/subjects/BehaviorSubject; iget-wide v1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->selectedVoiceChannelId:J const-wide/16 v3, 0x0 cmp-long v5, v1, v3 if-lez v5, :cond_0 iget-object v1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->clock:Lcom/discord/utilities/time/Clock; invoke-interface {v1}, Lcom/discord/utilities/time/Clock;->currentTimeMillis()J move-result-wide v3 :cond_0 invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long; move-result-object v1 invoke-virtual {v0, v1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V :cond_1 const/4 v0, 0x0 iput-boolean v0, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->isDirty:Z return-void .end method .method public final set(J)Lrx/Observable; .locals 3 .annotation system Ldalvik/annotation/Signature; value = { "(J)", "Lrx/Observable<", "Lcom/discord/stores/StoreVoiceChannelSelected$JoinVoiceChannelResult;", ">;" } .end annotation invoke-static {}, Lrx/subjects/PublishSubject;->g0()Lrx/subjects/PublishSubject; move-result-object v0 iget-object v1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->dispatcher:Lcom/discord/stores/Dispatcher; new-instance v2, Lcom/discord/stores/StoreVoiceChannelSelected$set$1; invoke-direct {v2, p0, p1, p2, v0}, Lcom/discord/stores/StoreVoiceChannelSelected$set$1;->(Lcom/discord/stores/StoreVoiceChannelSelected;JLrx/subjects/PublishSubject;)V invoke-virtual {v1, v2}, Lcom/discord/stores/Dispatcher;->schedule(Lkotlin/jvm/functions/Function0;)V const-string p1, "resultSubject" invoke-static {v0, p1}, Lz/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V return-object v0 .end method .method public final setLastSelectedVoiceChannelId$app_productionDiscordExternalRelease(J)V .locals 0 iput-wide p1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->lastSelectedVoiceChannelId:J return-void .end method .method public final setSelectedVoiceChannelId$app_productionDiscordExternalRelease(J)V .locals 0 iput-wide p1, p0, Lcom/discord/stores/StoreVoiceChannelSelected;->selectedVoiceChannelId:J return-void .end method