2019-02-04 20:08:30 +00:00
|
|
|
.class final Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$2;
|
|
|
|
.super Lkotlin/jvm/internal/k;
|
2019-02-04 20:29:01 +00:00
|
|
|
.source "WidgetGlobalSearchModel.kt"
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Lkotlin/jvm/functions/Function3;
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
|
|
value = Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion;->create(Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$SearchContext;Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$UsersContext;Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ChannelContext;Lcom/discord/widgets/guilds/list/WidgetGuildsListModel;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Lcom/discord/widgets/user/search/WidgetGlobalSearchModel;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
|
|
accessFlags = 0x18
|
|
|
|
name = null
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"Lkotlin/jvm/internal/k;",
|
|
|
|
"Lkotlin/jvm/functions/Function3<",
|
|
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
|
|
"Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ItemUser;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field final synthetic $channelContext:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ChannelContext;
|
|
|
|
|
|
|
|
.field final synthetic $searchContext:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$SearchContext;
|
|
|
|
|
|
|
|
.field final synthetic $usersContext:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$UsersContext;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method constructor <init>(Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$UsersContext;Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$SearchContext;Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ChannelContext;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$2;->$usersContext:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$UsersContext;
|
|
|
|
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$2;->$searchContext:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$SearchContext;
|
|
|
|
|
|
|
|
iput-object p3, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$2;->$channelContext:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ChannelContext;
|
|
|
|
|
|
|
|
const/4 p1, 0x3
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lkotlin/jvm/internal/k;-><init>(I)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic invoke$default(Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$2;Lcom/discord/models/domain/ModelUser;Ljava/lang/String;Lcom/discord/models/domain/ModelChannel;ILjava/lang/Object;)Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ItemUser;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
and-int/lit8 p4, p4, 0x2
|
|
|
|
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
|
|
|
|
const/4 p3, 0x0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p0, p1, p2, p3}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$2;->invoke(Lcom/discord/models/domain/ModelUser;Ljava/lang/String;Lcom/discord/models/domain/ModelChannel;)Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ItemUser;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final invoke(Lcom/discord/models/domain/ModelUser;Ljava/lang/String;Lcom/discord/models/domain/ModelChannel;)Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ItemUser;
|
2019-02-04 20:29:01 +00:00
|
|
|
.locals 10
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
const-string v1, "receiver$0"
|
|
|
|
|
|
|
|
invoke-static {p1, v1}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
const-string v1, "userFilter"
|
|
|
|
|
|
|
|
invoke-static {p2, v1}, Lkotlin/jvm/internal/j;->h(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$2;->$usersContext:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$UsersContext;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$UsersContext;->getComputed()Ljava/util/Map;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Ljava/lang/Iterable;
|
|
|
|
|
|
|
|
new-instance v3, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
|
|
|
check-cast v3, Ljava/util/Collection;
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
check-cast v4, Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
move-result-wide v6
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
invoke-static {v6, v7}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
move-result-object v6
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
invoke-interface {v4, v6}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
check-cast v4, Lcom/discord/models/domain/ModelGuildMember$Computed;
|
|
|
|
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelGuildMember$Computed;->getNick()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
if-eqz v5, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v3, v5}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
check-cast v3, Ljava/util/List;
|
|
|
|
|
|
|
|
check-cast v3, Ljava/lang/Iterable;
|
|
|
|
|
|
|
|
invoke-static {v3}, Lkotlin/a/l;->k(Ljava/lang/Iterable;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Ljava/lang/Iterable;
|
|
|
|
|
|
|
|
new-instance v3, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {v3}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
|
|
|
check-cast v3, Ljava/util/Collection;
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
:goto_1
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
if-eqz v4, :cond_4
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
check-cast v4, Ljava/lang/String;
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
sget-object v6, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel;->Companion:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
const-string v7, "it"
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
invoke-static {v4, v7}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
invoke-virtual {v6, v4, p2}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion;->toMatchedResult(Ljava/lang/String;Ljava/lang/String;)Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$MatchedResult;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
if-eqz v4, :cond_3
|
|
|
|
|
|
|
|
invoke-interface {v3, v4}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
check-cast v3, Ljava/util/List;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$2;->$searchContext:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$SearchContext;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$SearchContext;->getHasDiscriminator()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getUsername()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getDiscriminatorWithPadding()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getUsername()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
sget-object v4, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel;->Companion:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion;
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
const-string v6, "nameToMatch"
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
invoke-static {v1, v6}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {v4, v1, p2}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion;->toMatchedResult(Ljava/lang/String;Ljava/lang/String;)Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$MatchedResult;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
const/4 v6, 0x1
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
if-eqz v4, :cond_6
|
|
|
|
|
|
|
|
move-object v1, v4
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
goto :goto_3
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:cond_6
|
|
|
|
move-object v4, v3
|
|
|
|
|
|
|
|
check-cast v4, Ljava/util/Collection;
|
|
|
|
|
|
|
|
invoke-interface {v4}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
xor-int/2addr v4, v6
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
if-eqz v4, :cond_7
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {v3}, Lkotlin/a/l;->Y(Ljava/util/List;)Ljava/lang/Object;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$MatchedResult;
|
|
|
|
|
|
|
|
move-object v1, v0
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
goto :goto_3
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:cond_7
|
|
|
|
sget-object v4, Lcom/discord/utilities/search/SearchUtils;->INSTANCE:Lcom/discord/utilities/search/SearchUtils;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/lang/String;->toLowerCase()Ljava/lang/String;
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
move-result-object v7
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
const-string v8, "(this as java.lang.String).toLowerCase()"
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
invoke-static {v7, v8}, Lkotlin/jvm/internal/j;->g(Ljava/lang/Object;Ljava/lang/String;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
invoke-virtual {v4, p2, v7}, Lcom/discord/utilities/search/SearchUtils;->fuzzyMatch(Ljava/lang/String;Ljava/lang/String;)Z
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
if-eqz v4, :cond_8
|
|
|
|
|
|
|
|
new-instance v4, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$MatchedResult;
|
|
|
|
|
|
|
|
check-cast v1, Ljava/lang/CharSequence;
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
const/4 v7, -0x1
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {p2}, Ljava/lang/String;->length()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
invoke-direct {v4, v1, v7, v0}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$MatchedResult;-><init>(Ljava/lang/CharSequence;II)V
|
|
|
|
|
|
|
|
move-object v1, v4
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_8
|
|
|
|
move-object v1, v5
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
:goto_3
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz v1, :cond_e
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$2;->$usersContext:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$UsersContext;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$UsersContext;->getRelationships()Ljava/util/Map;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, 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 {v0, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Ljava/lang/Integer;
|
|
|
|
|
|
|
|
const/4 v4, 0x0
|
|
|
|
|
|
|
|
if-nez v0, :cond_9
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
goto :goto_4
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:cond_9
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
if-ne v0, v6, :cond_a
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
goto :goto_5
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:cond_a
|
2019-02-04 20:29:01 +00:00
|
|
|
:goto_4
|
|
|
|
const/4 v6, 0x0
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
:goto_5
|
2019-02-04 20:08:30 +00:00
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getUsername()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getDiscriminatorWithPadding()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-02-04 20:32:01 +00:00
|
|
|
invoke-static {v0}, Lkotlin/a/l;->aU(Ljava/lang/Object;)Ljava/util/List;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Ljava/util/Collection;
|
|
|
|
|
|
|
|
check-cast v3, Ljava/lang/Iterable;
|
|
|
|
|
|
|
|
new-instance v5, Ljava/util/ArrayList;
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
const/16 v7, 0xa
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
invoke-static {v3, v7}, Lkotlin/a/l;->a(Ljava/lang/Iterable;I)I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
move-result v7
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
invoke-direct {v5, v7}, Ljava/util/ArrayList;-><init>(I)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
check-cast v5, Ljava/util/Collection;
|
|
|
|
|
|
|
|
invoke-interface {v3}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
:goto_6
|
2019-02-04 20:08:30 +00:00
|
|
|
invoke-interface {v3}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
move-result v7
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
if-eqz v7, :cond_b
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-interface {v3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
move-result-object v7
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
check-cast v7, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$MatchedResult;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
invoke-virtual {v7}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$MatchedResult;->getValue()Ljava/lang/CharSequence;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
move-result-object v7
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
invoke-interface {v5, v7}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
goto :goto_6
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:cond_b
|
|
|
|
check-cast v5, Ljava/util/List;
|
|
|
|
|
|
|
|
check-cast v5, Ljava/lang/Iterable;
|
|
|
|
|
|
|
|
invoke-static {v0, v5}, Lkotlin/a/l;->b(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
if-eqz p3, :cond_c
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$2;->$searchContext:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$SearchContext;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$SearchContext;->getMentionCounts()Ljava/util/Map;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p3}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
move-result-wide v7
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
invoke-static {v7, v8}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
invoke-interface {v0, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Ljava/lang/Integer;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_c
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
move v7, v0
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
goto :goto_7
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:cond_c
|
2019-02-04 20:29:01 +00:00
|
|
|
const/4 v7, 0x0
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
:goto_7
|
2019-02-04 20:08:30 +00:00
|
|
|
if-eqz p3, :cond_d
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$2;->$channelContext:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ChannelContext;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ChannelContext;->getUnreadChannelIds()Ljava/util/Set;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p3}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v4
|
|
|
|
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-interface {v0, v4}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
move v8, v0
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
goto :goto_8
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:cond_d
|
2019-02-04 20:29:01 +00:00
|
|
|
const/4 v8, 0x0
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
:goto_8
|
|
|
|
new-instance v9, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ItemUser;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$2;->$usersContext:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$UsersContext;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$UsersContext;->getPresences()Ljava/util/Map;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, 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 {v0, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
move-object v5, v0
|
|
|
|
|
|
|
|
check-cast v5, Lcom/discord/models/domain/ModelPresence;
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
move-object v0, v9
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-object v2, p1
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
move v4, v6
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-object v6, p3
|
|
|
|
|
|
|
|
invoke-direct/range {v0 .. v8}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ItemUser;-><init>(Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$MatchedResult;Lcom/discord/models/domain/ModelUser;Ljava/util/List;ZLcom/discord/models/domain/ModelPresence;Lcom/discord/models/domain/ModelChannel;IZ)V
|
|
|
|
|
2019-02-04 20:29:01 +00:00
|
|
|
return-object v9
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
:cond_e
|
|
|
|
return-object v5
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final bridge synthetic invoke(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
check-cast p1, Lcom/discord/models/domain/ModelUser;
|
|
|
|
|
|
|
|
check-cast p2, Ljava/lang/String;
|
|
|
|
|
|
|
|
check-cast p3, Lcom/discord/models/domain/ModelChannel;
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1, p2, p3}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$2;->invoke(Lcom/discord/models/domain/ModelUser;Ljava/lang/String;Lcom/discord/models/domain/ModelChannel;)Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ItemUser;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|