502 lines
14 KiB
Smali
502 lines
14 KiB
Smali
.class public final Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$observeViewStateFromStores$1;
|
|
.super Ljava/lang/Object;
|
|
.source "WidgetGuildInviteShareViewModel.kt"
|
|
|
|
# interfaces
|
|
.implements Lrx/functions/Func5;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
value = Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->observeViewStateFromStores$app_productionDiscordExternalRelease()Lrx/Observable;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = null
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<T1:",
|
|
"Ljava/lang/Object;",
|
|
"T2:",
|
|
"Ljava/lang/Object;",
|
|
"T3:",
|
|
"Ljava/lang/Object;",
|
|
"T4:",
|
|
"Ljava/lang/Object;",
|
|
"T5:",
|
|
"Ljava/lang/Object;",
|
|
"R:",
|
|
"Ljava/lang/Object;",
|
|
">",
|
|
"Ljava/lang/Object;",
|
|
"Lrx/functions/Func5<",
|
|
"Lcom/discord/widgets/guilds/invite/WidgetInviteModel;",
|
|
"Ljava/util/List<",
|
|
"+",
|
|
"Lcom/discord/widgets/guilds/invite/InviteSuggestion;",
|
|
">;",
|
|
"Ljava/lang/String;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"+",
|
|
"Ljava/util/Set<",
|
|
"+",
|
|
"Ljava/lang/Long;",
|
|
">;>;",
|
|
"Lkotlin/Unit;",
|
|
"Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$ViewState$Loaded;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final synthetic this$0:Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$observeViewStateFromStores$1;->this$0:Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final call(Lcom/discord/widgets/guilds/invite/WidgetInviteModel;Ljava/util/List;Ljava/lang/String;Ljava/util/Map;Lkotlin/Unit;)Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$ViewState$Loaded;
|
|
.locals 9
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/widgets/guilds/invite/WidgetInviteModel;",
|
|
"Ljava/util/List<",
|
|
"+",
|
|
"Lcom/discord/widgets/guilds/invite/InviteSuggestion;",
|
|
">;",
|
|
"Ljava/lang/String;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"+",
|
|
"Ljava/util/Set<",
|
|
"Ljava/lang/Long;",
|
|
">;>;",
|
|
"Lkotlin/Unit;",
|
|
")",
|
|
"Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$ViewState$Loaded;"
|
|
}
|
|
.end annotation
|
|
|
|
const-string p5, "sentInvites"
|
|
|
|
invoke-static {p4, p5}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget-object p5, p0, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$observeViewStateFromStores$1;->this$0:Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/invite/WidgetInviteModel;->getInvite()Lcom/discord/models/domain/ModelInvite;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p5, v0}, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;->access$getInviteLink$p(Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel;Lcom/discord/models/domain/ModelInvite;)Ljava/lang/String;
|
|
|
|
move-result-object p5
|
|
|
|
const-string/jumbo v0, "widgetInviteModel.invite.inviteLink"
|
|
|
|
invoke-static {p5, v0}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-interface {p4, p5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p5
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
sget-object p5, Lc0/i/n;->d:Lc0/i/n;
|
|
|
|
:goto_0
|
|
check-cast p5, Ljava/util/Set;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-eqz p3, :cond_2
|
|
|
|
invoke-static {p3}, Lc0/t/k;->isBlank(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 v2, 0x0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
:goto_1
|
|
const/4 v2, 0x1
|
|
|
|
:goto_2
|
|
const-string v3, "inviteSuggestions"
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
invoke-static {p2, v3}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
goto :goto_5
|
|
|
|
:cond_3
|
|
invoke-static {p2, v3}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance v2, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
invoke-interface {p2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p2
|
|
|
|
:cond_4
|
|
:goto_3
|
|
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_7
|
|
|
|
invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
move-object v4, v3
|
|
|
|
check-cast v4, Lcom/discord/widgets/guilds/invite/InviteSuggestion;
|
|
|
|
instance-of v5, v4, Lcom/discord/widgets/guilds/invite/InviteSuggestion$Channel;
|
|
|
|
if-eqz v5, :cond_5
|
|
|
|
check-cast v4, Lcom/discord/widgets/guilds/invite/InviteSuggestion$Channel;
|
|
|
|
invoke-virtual {v4}, Lcom/discord/widgets/guilds/invite/InviteSuggestion$Channel;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelChannel;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v5, "inviteSuggestion.channel.name"
|
|
|
|
invoke-static {v4, v5}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v4, p3, v1}, Lc0/t/p;->contains(Ljava/lang/CharSequence;Ljava/lang/CharSequence;Z)Z
|
|
|
|
move-result v4
|
|
|
|
goto :goto_4
|
|
|
|
:cond_5
|
|
instance-of v5, v4, Lcom/discord/widgets/guilds/invite/InviteSuggestion$User;
|
|
|
|
if-eqz v5, :cond_6
|
|
|
|
check-cast v4, Lcom/discord/widgets/guilds/invite/InviteSuggestion$User;
|
|
|
|
invoke-virtual {v4}, Lcom/discord/widgets/guilds/invite/InviteSuggestion$User;->getUser()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelUser;->getUsername()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v5, "inviteSuggestion.user.username"
|
|
|
|
invoke-static {v4, v5}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {v4, p3, v1}, Lc0/t/p;->contains(Ljava/lang/CharSequence;Ljava/lang/CharSequence;Z)Z
|
|
|
|
move-result v4
|
|
|
|
:goto_4
|
|
if-eqz v4, :cond_4
|
|
|
|
invoke-interface {v2, v3}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_3
|
|
|
|
:cond_6
|
|
new-instance p1, Lkotlin/NoWhenBranchMatchedException;
|
|
|
|
invoke-direct {p1}, Lkotlin/NoWhenBranchMatchedException;-><init>()V
|
|
|
|
throw p1
|
|
|
|
:cond_7
|
|
move-object p2, v2
|
|
|
|
:goto_5
|
|
invoke-virtual {p1}, Lcom/discord/widgets/guilds/invite/WidgetInviteModel;->getDms()Ljava/util/List;
|
|
|
|
move-result-object v2
|
|
|
|
new-instance v3, Ljava/util/ArrayList;
|
|
|
|
const/16 v4, 0xa
|
|
|
|
invoke-static {v2, v4}, Lf/h/a/f/e/n/f;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
move-result v5
|
|
|
|
invoke-direct {v3, v5}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v2
|
|
|
|
:goto_6
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_8
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v5
|
|
|
|
check-cast v5, Lcom/discord/models/domain/ModelChannel;
|
|
|
|
invoke-virtual {v5}, Lcom/discord/models/domain/ModelChannel;->getRecipients()Ljava/util/List;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-interface {v6, v0}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v6
|
|
|
|
const-string v7, "dm.recipients[0]"
|
|
|
|
invoke-static {v6, v7}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
check-cast v6, Lcom/discord/models/domain/ModelUser;
|
|
|
|
invoke-virtual {v6}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v6
|
|
|
|
invoke-static {v6, v7}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v5}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v7
|
|
|
|
invoke-static {v7, v8}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
new-instance v7, Lkotlin/Pair;
|
|
|
|
invoke-direct {v7, v6, v5}, Lkotlin/Pair;-><init>(Ljava/lang/Object;Ljava/lang/Object;)V
|
|
|
|
invoke-interface {v3, v7}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_6
|
|
|
|
:cond_8
|
|
invoke-static {v3}, Lf/h/a/f/e/n/f;->toMap(Ljava/lang/Iterable;)Ljava/util/Map;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {p2}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v3
|
|
|
|
xor-int/2addr v3, v1
|
|
|
|
if-nez v3, :cond_c
|
|
|
|
if-eqz p3, :cond_9
|
|
|
|
invoke-static {p3}, Lc0/t/k;->isBlank(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_a
|
|
|
|
:cond_9
|
|
const/4 v0, 0x1
|
|
|
|
:cond_a
|
|
if-eqz v0, :cond_b
|
|
|
|
goto :goto_7
|
|
|
|
:cond_b
|
|
sget-object p2, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShare$InviteSuggestionItem;->SearchNoResultsItem:Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShare$InviteSuggestionItem$SearchNoResultsItem;
|
|
|
|
invoke-static {p2}, Lf/h/a/f/e/n/f;->listOf(Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object p2
|
|
|
|
goto :goto_a
|
|
|
|
:cond_c
|
|
:goto_7
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-static {p2, v4}, Lf/h/a/f/e/n/f;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
|
|
|
move-result v1
|
|
|
|
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
invoke-interface {p2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p2
|
|
|
|
:goto_8
|
|
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_f
|
|
|
|
invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/discord/widgets/guilds/invite/InviteSuggestion;
|
|
|
|
instance-of v3, v1, Lcom/discord/widgets/guilds/invite/InviteSuggestion$Channel;
|
|
|
|
if-eqz v3, :cond_d
|
|
|
|
new-instance v3, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShare$InviteSuggestionItem$Channel;
|
|
|
|
check-cast v1, Lcom/discord/widgets/guilds/invite/InviteSuggestion$Channel;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/guilds/invite/InviteSuggestion$Channel;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/guilds/invite/InviteSuggestion$Channel;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v5
|
|
|
|
invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {p5, v1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
invoke-direct {v3, v4, v1}, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShare$InviteSuggestionItem$Channel;-><init>(Lcom/discord/models/domain/ModelChannel;Z)V
|
|
|
|
goto :goto_9
|
|
|
|
:cond_d
|
|
instance-of v3, v1, Lcom/discord/widgets/guilds/invite/InviteSuggestion$User;
|
|
|
|
if-eqz v3, :cond_e
|
|
|
|
new-instance v3, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShare$InviteSuggestionItem$User;
|
|
|
|
check-cast v1, Lcom/discord/widgets/guilds/invite/InviteSuggestion$User;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/guilds/invite/InviteSuggestion$User;->getUser()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/guilds/invite/InviteSuggestion$User;->getUser()Lcom/discord/models/domain/ModelUser;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v5
|
|
|
|
invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v2, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {p5, v1}, Lc0/i/f;->contains(Ljava/lang/Iterable;Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
invoke-direct {v3, v4, v1}, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShare$InviteSuggestionItem$User;-><init>(Lcom/discord/models/domain/ModelUser;Z)V
|
|
|
|
:goto_9
|
|
invoke-interface {v0, v3}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_8
|
|
|
|
:cond_e
|
|
new-instance p1, Lkotlin/NoWhenBranchMatchedException;
|
|
|
|
invoke-direct {p1}, Lkotlin/NoWhenBranchMatchedException;-><init>()V
|
|
|
|
throw p1
|
|
|
|
:cond_f
|
|
move-object p2, v0
|
|
|
|
:goto_a
|
|
new-instance p5, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$ViewState$Loaded;
|
|
|
|
const-string/jumbo v0, "widgetInviteModel"
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "filter"
|
|
|
|
invoke-static {p3, v0}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p5, p1, p2, p3, p4}, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$ViewState$Loaded;-><init>(Lcom/discord/widgets/guilds/invite/WidgetInviteModel;Ljava/util/List;Ljava/lang/String;Ljava/util/Map;)V
|
|
|
|
return-object p5
|
|
.end method
|
|
|
|
.method public bridge synthetic call(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
.locals 0
|
|
|
|
check-cast p1, Lcom/discord/widgets/guilds/invite/WidgetInviteModel;
|
|
|
|
check-cast p2, Ljava/util/List;
|
|
|
|
check-cast p3, Ljava/lang/String;
|
|
|
|
check-cast p4, Ljava/util/Map;
|
|
|
|
check-cast p5, Lkotlin/Unit;
|
|
|
|
invoke-virtual/range {p0 .. p5}, Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$observeViewStateFromStores$1;->call(Lcom/discord/widgets/guilds/invite/WidgetInviteModel;Ljava/util/List;Ljava/lang/String;Ljava/util/Map;Lkotlin/Unit;)Lcom/discord/widgets/guilds/invite/WidgetGuildInviteShareViewModel$ViewState$Loaded;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|