222 lines
5.4 KiB
Smali
222 lines
5.4 KiB
Smali
.class public final Lcom/discord/widgets/guilds/invite/WidgetInviteModel$Companion;
|
|
.super Ljava/lang/Object;
|
|
.source "WidgetInviteModel.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/guilds/invite/WidgetInviteModel;
|
|
.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/guilds/invite/WidgetInviteModel$Companion;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final create(Lcom/discord/models/domain/ModelInvite$Settings;Ljava/util/Map;Lcom/discord/widgets/guilds/invite/InviteGenerator$InviteGenerationState;Ljava/lang/Long;Lcom/discord/models/domain/ModelUser;Ljava/util/List;)Lcom/discord/widgets/guilds/invite/WidgetInviteModel;
|
|
.locals 12
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/models/domain/ModelInvite$Settings;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
">;",
|
|
"Lcom/discord/widgets/guilds/invite/InviteGenerator$InviteGenerationState;",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
"Ljava/util/List<",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
">;)",
|
|
"Lcom/discord/widgets/guilds/invite/WidgetInviteModel;"
|
|
}
|
|
.end annotation
|
|
|
|
move-object v0, p2
|
|
|
|
move-object/from16 v1, p4
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eqz p1, :cond_7
|
|
|
|
if-eqz v0, :cond_6
|
|
|
|
if-eqz p3, :cond_5
|
|
|
|
if-eqz p5, :cond_4
|
|
|
|
if-eqz p6, :cond_3
|
|
|
|
invoke-virtual {p3}, Lcom/discord/widgets/guilds/invite/InviteGenerator$InviteGenerationState;->getLastGeneratedInvite()Lcom/discord/models/domain/ModelInvite;
|
|
|
|
move-result-object v6
|
|
|
|
new-instance v9, Ljava/util/ArrayList;
|
|
|
|
invoke-interface {p2}, Ljava/util/Map;->values()Ljava/util/Collection;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-direct {v9, v3}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
|
|
|
|
invoke-static {}, Lcom/discord/models/domain/ModelChannel;->getSortByNameAndType()Ljava/util/Comparator;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v9, v3}, Ljava/util/Collections;->sort(Ljava/util/List;Ljava/util/Comparator;)V
|
|
|
|
invoke-interface {p2, v1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
move-result v3
|
|
|
|
const/4 v4, 0x0
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
invoke-interface {p2, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
move-object v2, v0
|
|
|
|
check-cast v2, Lcom/discord/models/domain/ModelChannel;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {v9}, Ljava/util/ArrayList;->isEmpty()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
invoke-virtual {v9, v4}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
move-object v2, v0
|
|
|
|
check-cast v2, Lcom/discord/models/domain/ModelChannel;
|
|
|
|
:cond_1
|
|
:goto_0
|
|
if-eqz v6, :cond_2
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
invoke-virtual {v6}, Lcom/discord/models/domain/ModelInvite;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-virtual {v6}, Lcom/discord/models/domain/ModelInvite;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "generatedInvite.channel"
|
|
|
|
invoke-static {v0, v1}, Ly/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelChannel;->getId()J
|
|
|
|
move-result-wide v7
|
|
|
|
cmp-long v3, v0, v7
|
|
|
|
if-nez v3, :cond_2
|
|
|
|
const/4 v0, 0x1
|
|
|
|
const/4 v8, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/4 v8, 0x0
|
|
|
|
:goto_1
|
|
new-instance v0, Lcom/discord/widgets/guilds/invite/WidgetInviteModel;
|
|
|
|
invoke-virtual {p3}, Lcom/discord/widgets/guilds/invite/InviteGenerator$InviteGenerationState;->isGenerating()Z
|
|
|
|
move-result v7
|
|
|
|
move-object v3, v0
|
|
|
|
move-object v4, v2
|
|
|
|
move-object v5, p1
|
|
|
|
move-object/from16 v10, p5
|
|
|
|
move-object/from16 v11, p6
|
|
|
|
invoke-direct/range {v3 .. v11}, Lcom/discord/widgets/guilds/invite/WidgetInviteModel;-><init>(Lcom/discord/models/domain/ModelChannel;Lcom/discord/models/domain/ModelInvite$Settings;Lcom/discord/models/domain/ModelInvite;ZZLjava/util/List;Lcom/discord/models/domain/ModelUser;Ljava/util/List;)V
|
|
|
|
return-object v0
|
|
|
|
:cond_3
|
|
const-string v0, "dms"
|
|
|
|
invoke-static {v0}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
|
|
:cond_4
|
|
const-string v0, "me"
|
|
|
|
invoke-static {v0}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
|
|
:cond_5
|
|
const-string v0, "inviteGenerationState"
|
|
|
|
invoke-static {v0}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
|
|
:cond_6
|
|
const-string v0, "invitableChannels"
|
|
|
|
invoke-static {v0}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
|
|
:cond_7
|
|
const-string v0, "settings"
|
|
|
|
invoke-static {v0}, Ly/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
.end method
|