438 lines
12 KiB
Smali
438 lines
12 KiB
Smali
.class public final Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel$Companion;
|
|
.super Ljava/lang/Object;
|
|
.source "WidgetGlobalSearchGuildsModel.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Companion"
|
|
.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/user/search/WidgetGlobalSearchGuildsModel$Companion;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final asDirectMessageItems(Ljava/util/Map;Ljava/util/Map;Lcom/discord/models/domain/ModelNotificationSettings;)Lkotlin/sequences/Sequence;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
">;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Integer;",
|
|
">;",
|
|
"Lcom/discord/models/domain/ModelNotificationSettings;",
|
|
")",
|
|
"Lkotlin/sequences/Sequence<",
|
|
"Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel$Item;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
invoke-interface {p1}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Ly/q/l;->asSequence(Ljava/lang/Iterable;)Lkotlin/sequences/Sequence;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Le/k/a/c/e/p/g;->filterNotNull(Lkotlin/sequences/Sequence;)Lkotlin/sequences/Sequence;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v0, Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel$Companion$asDirectMessageItems$1;
|
|
|
|
invoke-direct {v0, p3, p2}, Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel$Companion$asDirectMessageItems$1;-><init>(Lcom/discord/models/domain/ModelNotificationSettings;Ljava/util/Map;)V
|
|
|
|
invoke-static {p1, v0}, Le/k/a/c/e/p/g;->filter(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {}, Lcom/discord/models/domain/ModelChannel;->getSortByNameAndType()Ljava/util/Comparator;
|
|
|
|
move-result-object p3
|
|
|
|
const-string v0, "ModelChannel.getSortByNameAndType()"
|
|
|
|
invoke-static {p3, v0}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-static {p1, p3}, Le/k/a/c/e/p/g;->sortedWith(Lkotlin/sequences/Sequence;Ljava/util/Comparator;)Lkotlin/sequences/Sequence;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance p3, Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel$Companion$asDirectMessageItems$2;
|
|
|
|
invoke-direct {p3, p2}, Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel$Companion$asDirectMessageItems$2;-><init>(Ljava/util/Map;)V
|
|
|
|
invoke-static {p1, p3}, Le/k/a/c/e/p/g;->map(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method private final asGuildItems(Lkotlin/sequences/Sequence;JJLjava/util/Set;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)Lkotlin/sequences/Sequence;
|
|
.locals 10
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lkotlin/sequences/Sequence<",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelGuild;",
|
|
">;JJ",
|
|
"Ljava/util/Set<",
|
|
"Ljava/lang/Long;",
|
|
">;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelNotificationSettings;",
|
|
">;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Integer;",
|
|
">;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/Long;",
|
|
">;>;)",
|
|
"Lkotlin/sequences/Sequence<",
|
|
"Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel$Item;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v9, Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel$Companion$asGuildItems$1;
|
|
|
|
move-object v0, v9
|
|
|
|
move-object/from16 v1, p9
|
|
|
|
move-object/from16 v2, p8
|
|
|
|
move-object/from16 v3, p7
|
|
|
|
move-object/from16 v4, p6
|
|
|
|
move-wide v5, p2
|
|
|
|
move-wide v7, p4
|
|
|
|
invoke-direct/range {v0 .. v8}, Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel$Companion$asGuildItems$1;-><init>(Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Set;JJ)V
|
|
|
|
move-object v0, p1
|
|
|
|
invoke-static {p1, v9}, Le/k/a/c/e/p/g;->map(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final create(Ljava/util/List;JLjava/util/Set;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel;
|
|
.locals 14
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/Long;",
|
|
">;J",
|
|
"Ljava/util/Set<",
|
|
"Ljava/lang/Long;",
|
|
">;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Ljava/lang/Integer;",
|
|
">;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
">;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelGuild;",
|
|
">;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/Long;",
|
|
">;>;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelNotificationSettings;",
|
|
">;)",
|
|
"Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel;"
|
|
}
|
|
.end annotation
|
|
|
|
move-object v0, p1
|
|
|
|
move-object/from16 v8, p5
|
|
|
|
move-object/from16 v1, p6
|
|
|
|
move-object/from16 v2, p7
|
|
|
|
move-object/from16 v7, p9
|
|
|
|
const/4 v10, 0x0
|
|
|
|
if-eqz v0, :cond_8
|
|
|
|
if-eqz p4, :cond_7
|
|
|
|
if-eqz v8, :cond_6
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
if-eqz p8, :cond_3
|
|
|
|
if-eqz v7, :cond_2
|
|
|
|
const-wide/16 v3, 0x0
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v7, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Lcom/discord/models/domain/ModelNotificationSettings;
|
|
|
|
move-object v11, p0
|
|
|
|
invoke-direct {p0, v1, v8, v3}, Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel$Companion;->asDirectMessageItems(Ljava/util/Map;Ljava/util/Map;Lcom/discord/models/domain/ModelNotificationSettings;)Lkotlin/sequences/Sequence;
|
|
|
|
move-result-object v12
|
|
|
|
invoke-static {p1}, Ly/q/l;->first(Ljava/util/List;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/lang/Number;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-interface/range {p7 .. p7}, Ljava/util/Map;->keySet()Ljava/util/Set;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {p1, v1}, Ly/q/l;->plus(Ljava/util/Collection;Ljava/lang/Iterable;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Ly/q/l;->asSequence(Ljava/lang/Iterable;)Lkotlin/sequences/Sequence;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Le/k/a/c/e/p/g;->distinct(Lkotlin/sequences/Sequence;)Lkotlin/sequences/Sequence;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v13, 0x1
|
|
|
|
invoke-static {v0, v13}, Le/k/a/c/e/p/g;->drop(Lkotlin/sequences/Sequence;I)Lkotlin/sequences/Sequence;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel$Companion$create$guildItems$1;
|
|
|
|
invoke-direct {v1, v2}, Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel$Companion$create$guildItems$1;-><init>(Ljava/util/Map;)V
|
|
|
|
invoke-static {v0, v1}, Le/k/a/c/e/p/g;->mapNotNull(Lkotlin/sequences/Sequence;Lkotlin/jvm/functions/Function1;)Lkotlin/sequences/Sequence;
|
|
|
|
move-result-object v1
|
|
|
|
move-object v0, p0
|
|
|
|
move-wide v2, v3
|
|
|
|
move-wide/from16 v4, p2
|
|
|
|
move-object/from16 v6, p4
|
|
|
|
move-object/from16 v7, p9
|
|
|
|
move-object/from16 v8, p5
|
|
|
|
move-object/from16 v9, p8
|
|
|
|
invoke-direct/range {v0 .. v9}, Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel$Companion;->asGuildItems(Lkotlin/sequences/Sequence;JJLjava/util/Set;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)Lkotlin/sequences/Sequence;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel$Companion$create$$inlined$sortedByDescending$1;
|
|
|
|
invoke-direct {v1}, Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel$Companion$create$$inlined$sortedByDescending$1;-><init>()V
|
|
|
|
invoke-static {v0, v1}, Le/k/a/c/e/p/g;->sortedWith(Lkotlin/sequences/Sequence;Ljava/util/Comparator;)Lkotlin/sequences/Sequence;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v12, :cond_1
|
|
|
|
invoke-interface {v12}, Lkotlin/sequences/Sequence;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
new-array v1, v13, [Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel$Item;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
sget-object v3, Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel$Item;->Companion:Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel$Item$Companion;
|
|
|
|
invoke-virtual {v3}, Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel$Item$Companion;->createDivider$app_productionDiscordExternalRelease()Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel$Item;
|
|
|
|
move-result-object v3
|
|
|
|
aput-object v3, v1, v2
|
|
|
|
invoke-static {v1}, Le/k/a/c/e/p/g;->sequenceOf([Ljava/lang/Object;)Lkotlin/sequences/Sequence;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
sget-object v1, Ly/z/e;->a:Ly/z/e;
|
|
|
|
:goto_0
|
|
invoke-static {v12, v1}, Le/k/a/c/e/p/g;->plus(Lkotlin/sequences/Sequence;Lkotlin/sequences/Sequence;)Lkotlin/sequences/Sequence;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v1, v0}, Le/k/a/c/e/p/g;->plus(Lkotlin/sequences/Sequence;Lkotlin/sequences/Sequence;)Lkotlin/sequences/Sequence;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Le/k/a/c/e/p/g;->toList(Lkotlin/sequences/Sequence;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface/range {p8 .. p8}, Ljava/util/Map;->isEmpty()Z
|
|
|
|
move-result v1
|
|
|
|
xor-int/2addr v1, v13
|
|
|
|
new-instance v2, Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel;
|
|
|
|
invoke-direct {v2, v0, v1}, Lcom/discord/widgets/user/search/WidgetGlobalSearchGuildsModel;-><init>(Ljava/util/List;Z)V
|
|
|
|
return-object v2
|
|
|
|
:cond_1
|
|
const-string v0, "$this$any"
|
|
|
|
invoke-static {v0}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v10
|
|
|
|
:cond_2
|
|
move-object v11, p0
|
|
|
|
const-string v0, "guildSettings"
|
|
|
|
invoke-static {v0}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v10
|
|
|
|
:cond_3
|
|
move-object v11, p0
|
|
|
|
const-string v0, "channelIds"
|
|
|
|
invoke-static {v0}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v10
|
|
|
|
:cond_4
|
|
move-object v11, p0
|
|
|
|
const-string v0, "guilds"
|
|
|
|
invoke-static {v0}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v10
|
|
|
|
:cond_5
|
|
move-object v11, p0
|
|
|
|
const-string v0, "privateChannels"
|
|
|
|
invoke-static {v0}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v10
|
|
|
|
:cond_6
|
|
move-object v11, p0
|
|
|
|
const-string v0, "mentionCounts"
|
|
|
|
invoke-static {v0}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v10
|
|
|
|
:cond_7
|
|
move-object v11, p0
|
|
|
|
const-string v0, "unreadGuildIds"
|
|
|
|
invoke-static {v0}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v10
|
|
|
|
:cond_8
|
|
move-object v11, p0
|
|
|
|
const-string v0, "recentGuildIds"
|
|
|
|
invoke-static {v0}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v10
|
|
.end method
|