263 lines
7.7 KiB
Smali
263 lines
7.7 KiB
Smali
.class public final Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$3;
|
|
.super Lk0/o/c/j;
|
|
.source "WidgetGlobalSearchModel.kt"
|
|
|
|
# interfaces
|
|
.implements Lkotlin/jvm/functions/Function2;
|
|
|
|
|
|
# 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/user/search/WidgetGlobalSearchGuildsModel;Lkotlin/jvm/functions/Function1;Lkotlin/jvm/functions/Function1;)Lcom/discord/widgets/user/search/WidgetGlobalSearchModel;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = null
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lk0/o/c/j;",
|
|
"Lkotlin/jvm/functions/Function2<",
|
|
"Lcom/discord/models/domain/ModelGuild;",
|
|
"Ljava/lang/String;",
|
|
"Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ItemGuild;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final synthetic $channelContext:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ChannelContext;
|
|
|
|
.field public final synthetic $searchContext:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$SearchContext;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ChannelContext;Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$SearchContext;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$3;->$channelContext:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ChannelContext;
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$3;->$searchContext:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$SearchContext;
|
|
|
|
const/4 p1, 0x2
|
|
|
|
invoke-direct {p0, p1}, Lk0/o/c/j;-><init>(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final invoke(Lcom/discord/models/domain/ModelGuild;Ljava/lang/String;)Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ItemGuild;
|
|
.locals 11
|
|
|
|
const-string v0, "$this$toItemGuild"
|
|
|
|
invoke-static {p1, v0}, Lk0/o/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "guildFilter"
|
|
|
|
invoke-static {p2, v0}, Lk0/o/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel;->Companion:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "name"
|
|
|
|
invoke-static {v1, v2}, Lk0/o/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0, 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
|
|
|
|
if-eqz v4, :cond_6
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$3;->$channelContext:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ChannelContext;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ChannelContext;->getGuildToChannels()Ljava/util/Map;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p2, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object p2
|
|
|
|
check-cast p2, Ljava/util/List;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
invoke-interface {p2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v5
|
|
|
|
iget-object v3, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$3;->$searchContext:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$SearchContext;
|
|
|
|
invoke-virtual {v3}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$SearchContext;->getMentionCounts()Ljava/util/Map;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-interface {v3, v5}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/lang/Integer;
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
invoke-virtual {v3}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v3
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
const/4 v3, 0x0
|
|
|
|
:goto_1
|
|
add-int/2addr v2, v3
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
move v7, v2
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
const/4 v7, 0x0
|
|
|
|
:goto_2
|
|
if-eqz p2, :cond_5
|
|
|
|
invoke-interface {p2}, Ljava/util/Collection;->isEmpty()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
invoke-interface {p2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p2
|
|
|
|
:cond_4
|
|
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v1
|
|
|
|
iget-object v3, p0, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$3;->$channelContext:Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ChannelContext;
|
|
|
|
invoke-virtual {v3}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ChannelContext;->getUnreadChannelIds()Ljava/util/Set;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v1, v2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v3, v1}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
const/4 p2, 0x1
|
|
|
|
const/4 v8, 0x1
|
|
|
|
goto :goto_4
|
|
|
|
:cond_5
|
|
:goto_3
|
|
const/4 v8, 0x0
|
|
|
|
:goto_4
|
|
new-instance p2, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ItemGuild;
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v9, 0x4
|
|
|
|
const/4 v10, 0x0
|
|
|
|
move-object v3, p2
|
|
|
|
move-object v5, p1
|
|
|
|
invoke-direct/range {v3 .. v10}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ItemGuild;-><init>(Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$MatchedResult;Lcom/discord/models/domain/ModelGuild;Lcom/discord/models/domain/ModelChannel;IZILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
goto :goto_5
|
|
|
|
:cond_6
|
|
const/4 p2, 0x0
|
|
|
|
:goto_5
|
|
return-object p2
|
|
.end method
|
|
|
|
.method public bridge synthetic invoke(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
.locals 0
|
|
|
|
check-cast p1, Lcom/discord/models/domain/ModelGuild;
|
|
|
|
check-cast p2, Ljava/lang/String;
|
|
|
|
invoke-virtual {p0, p1, p2}, Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$Companion$create$3;->invoke(Lcom/discord/models/domain/ModelGuild;Ljava/lang/String;)Lcom/discord/widgets/user/search/WidgetGlobalSearchModel$ItemGuild;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|