2020-05-17 12:40:10 +00:00
|
|
|
.class public Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "WidgetServerSettingsVanityUrl.java"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
|
|
value = Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
|
|
accessFlags = 0x9
|
|
|
|
name = "Model"
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final guildId:J
|
|
|
|
|
|
|
|
.field public final guildName:Ljava/lang/String;
|
|
|
|
|
|
|
|
.field public final vanityUrl:Ljava/lang/String;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(JLjava/lang/String;Ljava/lang/String;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
iput-wide p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->guildId:J
|
|
|
|
|
|
|
|
iput-object p3, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->guildName:Ljava/lang/String;
|
|
|
|
|
|
|
|
iput-object p4, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->vanityUrl:Ljava/lang/String;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
.method public static synthetic a(JLcom/discord/models/domain/ModelUser;Ljava/lang/Long;Lcom/discord/models/domain/ModelGuild;)Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 0
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p2, p3, p4}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->canManage(Lcom/discord/models/domain/ModelUser;Ljava/lang/Long;Lcom/discord/models/domain/ModelGuild;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
new-instance p2, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
invoke-virtual {p4}, Lcom/discord/models/domain/ModelGuild;->getName()Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
invoke-virtual {p4}, Lcom/discord/models/domain/ModelGuild;->getVanityUrlCode()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p4
|
|
|
|
|
|
|
|
invoke-direct {p2, p0, p1, p3, p4}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;-><init>(JLjava/lang/String;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
return-object p2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p0, 0x0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic access$000(J)Lrx/Observable;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-static {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->get(J)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
.method public static canManage(Lcom/discord/models/domain/ModelUser;Ljava/lang/Long;Lcom/discord/models/domain/ModelGuild;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 3
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
|
|
|
|
if-nez p2, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelGuild;->canHaveVanityURL()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
invoke-virtual {p2, v1, v2}, Lcom/discord/models/domain/ModelGuild;->isOwner(J)Z
|
|
|
|
|
|
|
|
move-result p0
|
|
|
|
|
|
|
|
if-nez p0, :cond_1
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
const-wide/16 v1, 0x20
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v1, v2, p1}, Lcom/discord/utilities/permissions/PermissionUtils;->can(JLjava/lang/Long;)Z
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result p0
|
|
|
|
|
|
|
|
if-eqz p0, :cond_2
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
:goto_0
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
.method public static get(J)Lrx/Observable;
|
|
|
|
.locals 4
|
2020-05-17 12:40:10 +00:00
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(J)",
|
|
|
|
"Lrx/Observable<",
|
2020-07-14 22:43:59 +00:00
|
|
|
"Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;",
|
2020-05-17 12:40:10 +00:00
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getUsers()Lcom/discord/stores/StoreUser;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreUser;->observeMe()Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getPermissions()Lcom/discord/stores/StorePermissions;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v1, p0, p1}, Lcom/discord/stores/StorePermissions;->getForGuild(J)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getGuilds()Lcom/discord/stores/StoreGuilds;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual {v2, p0, p1}, Lcom/discord/stores/StoreGuilds;->observeGuild(J)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
new-instance v3, Lf/a/o/e/l3;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-direct {v3, p0, p1}, Lf/a/o/e/l3;-><init>(J)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
invoke-static {v0, v1, v2, v3}, Lrx/Observable;->i(Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/functions/Func3;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
return-object p0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public canEqual(Ljava/lang/Object;)Z
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
instance-of p1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;
|
|
|
|
|
|
|
|
return p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public equals(Ljava/lang/Object;)Z
|
|
|
|
.locals 7
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
if-ne p1, p0, :cond_0
|
|
|
|
|
|
|
|
return v0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
instance-of v1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
|
|
|
|
return v2
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
check-cast p1, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;
|
|
|
|
|
|
|
|
invoke-virtual {p1, p0}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->canEqual(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
|
|
|
|
return v2
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
iget-wide v3, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->guildId:J
|
|
|
|
|
|
|
|
iget-wide v5, p1, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->guildId:J
|
|
|
|
|
|
|
|
cmp-long v1, v3, v5
|
|
|
|
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
|
|
|
|
return v2
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->guildName:Ljava/lang/String;
|
|
|
|
|
|
|
|
iget-object v3, p1, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->guildName:Ljava/lang/String;
|
|
|
|
|
|
|
|
if-nez v1, :cond_4
|
|
|
|
|
|
|
|
if-eqz v3, :cond_5
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
invoke-virtual {v1, v3}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-nez v1, :cond_5
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
return v2
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->vanityUrl:Ljava/lang/String;
|
|
|
|
|
|
|
|
iget-object p1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->vanityUrl:Ljava/lang/String;
|
|
|
|
|
|
|
|
if-nez v1, :cond_6
|
|
|
|
|
|
|
|
if-eqz p1, :cond_7
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_6
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/Object;->equals(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-nez p1, :cond_7
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
return v2
|
|
|
|
|
|
|
|
:cond_7
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public hashCode()I
|
|
|
|
.locals 4
|
|
|
|
|
|
|
|
iget-wide v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->guildId:J
|
|
|
|
|
|
|
|
const/16 v2, 0x20
|
|
|
|
|
|
|
|
ushr-long v2, v0, v2
|
|
|
|
|
|
|
|
xor-long/2addr v0, v2
|
|
|
|
|
|
|
|
long-to-int v1, v0
|
|
|
|
|
|
|
|
const/16 v0, 0x3b
|
|
|
|
|
|
|
|
add-int/2addr v1, v0
|
|
|
|
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->guildName:Ljava/lang/String;
|
|
|
|
|
|
|
|
mul-int/lit8 v1, v1, 0x3b
|
|
|
|
|
|
|
|
const/16 v3, 0x2b
|
|
|
|
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
|
|
|
|
const/16 v2, 0x2b
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Object;->hashCode()I
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
add-int/2addr v1, v2
|
|
|
|
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->vanityUrl:Ljava/lang/String;
|
|
|
|
|
|
|
|
mul-int/lit8 v1, v1, 0x3b
|
|
|
|
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
invoke-virtual {v2}, Ljava/lang/Object;->hashCode()I
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
add-int/2addr v1, v3
|
|
|
|
|
|
|
|
return v1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
const-string v0, "WidgetServerSettingsVanityUrl.Model(guildId="
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-static {v0}, Lf/e/b/a/a;->E(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iget-wide v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->guildId:J
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string v1, ", guildName="
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->guildName:Ljava/lang/String;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string v1, ", vanityUrl="
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->vanityUrl:Ljava/lang/String;
|
|
|
|
|
|
|
|
const-string v2, ")"
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-static {v0, v1, v2}, Lf/e/b/a/a;->w(Ljava/lang/StringBuilder;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|