2020-03-03 02:12:30 +00:00
|
|
|
.class public final Lcom/discord/widgets/channels/memberlist/PrivateChannelMemberListItemGeneratorKt;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "PrivateChannelMemberListItemGenerator.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public static final createGroupDmHeader(I)Lcom/discord/widgets/channels/memberlist/adapter/ChannelMembersListAdapter$Item$Header;
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/channels/memberlist/adapter/ChannelMembersListAdapter$Item$Header;
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/widgets/channels/memberlist/adapter/ChannelMembersListAdapter$Item$Header$Type;->GROUP_DM:Lcom/discord/widgets/channels/memberlist/adapter/ChannelMembersListAdapter$Item$Header$Type;
|
|
|
|
|
|
|
|
const-string v2, "%group_header_key"
|
|
|
|
|
|
|
|
invoke-direct {v0, v2, v1, p0}, Lcom/discord/widgets/channels/memberlist/adapter/ChannelMembersListAdapter$Item$Header;-><init>(Ljava/lang/String;Lcom/discord/widgets/channels/memberlist/adapter/ChannelMembersListAdapter$Item$Header$Type;I)V
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final createMemberListItem(Lcom/discord/models/domain/ModelUser;Lcom/discord/models/domain/ModelPresence;ZLjava/lang/String;Z)Lcom/discord/widgets/channels/memberlist/adapter/ChannelMembersListAdapter$Item$Member;
|
|
|
|
.locals 11
|
|
|
|
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelUser;->getUsername()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
move-object v3, p3
|
|
|
|
|
|
|
|
const/4 p3, 0x0
|
|
|
|
|
|
|
|
const/4 v0, 0x2
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-static {p0, p3, v0, v1}, Lcom/discord/utilities/icon/IconUtils;->getForUser$default(Lcom/discord/models/domain/ModelUser;ZILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v7
|
|
|
|
|
|
|
|
new-instance p3, Lcom/discord/widgets/channels/memberlist/adapter/ChannelMembersListAdapter$Item$Member;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
const-string v0, "name"
|
|
|
|
|
2020-03-27 22:23:51 +00:00
|
|
|
invoke-static {v3, v0}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-03-03 02:12:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelUser;->isBot()Z
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v9, 0x0
|
|
|
|
|
|
|
|
move-object v0, p3
|
|
|
|
|
|
|
|
move-object v5, p1
|
|
|
|
|
|
|
|
move v8, p2
|
|
|
|
|
|
|
|
move v10, p4
|
|
|
|
|
|
|
|
invoke-direct/range {v0 .. v10}, Lcom/discord/widgets/channels/memberlist/adapter/ChannelMembersListAdapter$Item$Member;-><init>(JLjava/lang/String;ZLcom/discord/models/domain/ModelPresence;Ljava/lang/Integer;Ljava/lang/String;ZLjava/lang/String;Z)V
|
|
|
|
|
|
|
|
return-object p3
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final generateGroupDmMemberListItems(Lcom/discord/models/domain/ModelChannel;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;)Lcom/discord/widgets/channels/memberlist/WidgetChannelMembersListViewModel$MemberList;
|
|
|
|
.locals 11
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"+",
|
|
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
|
|
">;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelPresence;",
|
|
|
|
">;",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"Lcom/discord/models/domain/ModelApplicationStream;",
|
|
|
|
">;)",
|
|
|
|
"Lcom/discord/widgets/channels/memberlist/WidgetChannelMembersListViewModel$MemberList;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-eqz p0, :cond_7
|
|
|
|
|
|
|
|
if-eqz p1, :cond_6
|
|
|
|
|
|
|
|
if-eqz p2, :cond_5
|
|
|
|
|
|
|
|
if-eqz p3, :cond_4
|
|
|
|
|
|
|
|
new-instance v1, Ljava/util/TreeMap;
|
|
|
|
|
|
|
|
sget-object v2, Lcom/discord/widgets/channels/memberlist/PrivateChannelMemberListItemGeneratorKt$generateGroupDmMemberListItems$memberItems$1;->INSTANCE:Lcom/discord/widgets/channels/memberlist/PrivateChannelMemberListItemGeneratorKt$generateGroupDmMemberListItems$memberItems$1;
|
|
|
|
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
|
|
|
|
new-instance v3, Lcom/discord/widgets/channels/memberlist/PrivateChannelMemberListItemGeneratorKt$sam$java_util_Comparator$0;
|
|
|
|
|
|
|
|
invoke-direct {v3, v2}, Lcom/discord/widgets/channels/memberlist/PrivateChannelMemberListItemGeneratorKt$sam$java_util_Comparator$0;-><init>(Lkotlin/jvm/functions/Function2;)V
|
|
|
|
|
|
|
|
move-object v2, v3
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
check-cast v2, Ljava/util/Comparator;
|
|
|
|
|
|
|
|
invoke-direct {v1, v2}, Ljava/util/TreeMap;-><init>(Ljava/util/Comparator;)V
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
|
|
|
|
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
check-cast v3, Lcom/discord/models/domain/ModelUser;
|
|
|
|
|
|
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelUser;->getUsernameLower()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelUser;->getDiscriminatorWithPadding()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelChannel;->getNicks()Ljava/util/Map;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
if-eqz v5, :cond_1
|
|
|
|
|
|
|
|
invoke-static {v3, v5}, Le/e/b/a/a;->a(Lcom/discord/models/domain/ModelUser;Ljava/util/Map;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
check-cast v5, Lcom/discord/models/domain/ModelChannel$RecipientNick;
|
|
|
|
|
|
|
|
if-eqz v5, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {v5}, Lcom/discord/models/domain/ModelChannel$RecipientNick;->getNick()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
move-object v5, v0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelChannel;->getOwnerId()J
|
|
|
|
|
|
|
|
move-result-wide v6
|
|
|
|
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v8
|
|
|
|
|
|
|
|
cmp-long v10, v6, v8
|
|
|
|
|
|
|
|
if-nez v10, :cond_2
|
|
|
|
|
|
|
|
const/4 v6, 0x1
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
invoke-static {v3, p2}, Le/e/b/a/a;->a(Lcom/discord/models/domain/ModelUser;Ljava/util/Map;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v7
|
|
|
|
|
|
|
|
check-cast v7, Lcom/discord/models/domain/ModelPresence;
|
|
|
|
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v8
|
|
|
|
|
|
|
|
invoke-static {v8, v9}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v8
|
|
|
|
|
|
|
|
invoke-interface {p3, v8}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v8
|
|
|
|
|
|
|
|
invoke-static {v3, v7, v6, v5, v8}, Lcom/discord/widgets/channels/memberlist/PrivateChannelMemberListItemGeneratorKt;->createMemberListItem(Lcom/discord/models/domain/ModelUser;Lcom/discord/models/domain/ModelPresence;ZLjava/lang/String;Z)Lcom/discord/widgets/channels/memberlist/adapter/ChannelMembersListAdapter$Item$Member;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-interface {v1, v4, v3}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
invoke-interface {p1}, Ljava/util/Map;->size()I
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
new-instance p2, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
add-int/lit8 p3, p1, 0x1
|
|
|
|
|
|
|
|
invoke-direct {p2, p3}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/channels/memberlist/PrivateChannelMemberListItemGeneratorKt;->createGroupDmHeader(I)Lcom/discord/widgets/channels/memberlist/adapter/ChannelMembersListAdapter$Item$Header;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p2, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/util/TreeMap;->values()Ljava/util/Collection;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p2, p1}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z
|
|
|
|
|
|
|
|
new-instance p1, Lcom/discord/widgets/channels/memberlist/PrivateChannelMemberListItems;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-direct {p1, p0, p2}, Lcom/discord/widgets/channels/memberlist/PrivateChannelMemberListItems;-><init>(Ljava/lang/String;Ljava/util/List;)V
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
const-string p0, "applicationStreams"
|
|
|
|
|
2020-03-27 22:23:51 +00:00
|
|
|
invoke-static {p0}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
2020-03-03 02:12:30 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
const-string p0, "presences"
|
|
|
|
|
2020-03-27 22:23:51 +00:00
|
|
|
invoke-static {p0}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
2020-03-03 02:12:30 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_6
|
|
|
|
const-string p0, "users"
|
|
|
|
|
2020-03-27 22:23:51 +00:00
|
|
|
invoke-static {p0}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
2020-03-03 02:12:30 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_7
|
|
|
|
const-string p0, "channel"
|
|
|
|
|
2020-03-27 22:23:51 +00:00
|
|
|
invoke-static {p0}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
2020-03-03 02:12:30 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|