434 lines
12 KiB
Smali
434 lines
12 KiB
Smali
.class public Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;
|
|
.super Ljava/lang/Object;
|
|
.source "WidgetServerSettingsEditIntegration.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x9
|
|
name = "Model"
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final guild:Lcom/discord/models/domain/ModelGuild;
|
|
|
|
.field public final integration:Lcom/discord/models/domain/ModelGuildIntegration;
|
|
|
|
.field public final manageable:Z
|
|
|
|
.field public final role:Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(ZLcom/discord/models/domain/ModelGuild;Lcom/discord/models/domain/ModelGuildIntegration;Lcom/discord/models/domain/ModelGuildRole;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-boolean p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;->manageable:Z
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;->guild:Lcom/discord/models/domain/ModelGuild;
|
|
|
|
iput-object p3, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;->integration:Lcom/discord/models/domain/ModelGuildIntegration;
|
|
|
|
iput-object p4, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;->role:Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static create(Lcom/discord/models/domain/ModelUser;Lcom/discord/models/domain/ModelGuild;Ljava/util/Map;Ljava/lang/Long;Lcom/discord/models/domain/ModelGuildIntegration;)Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
"Lcom/discord/models/domain/ModelGuild;",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuildRole;",
|
|
">;",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/models/domain/ModelGuildIntegration;",
|
|
")",
|
|
"Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;"
|
|
}
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
if-eqz p2, :cond_2
|
|
|
|
if-eqz p3, :cond_2
|
|
|
|
if-nez p4, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
invoke-virtual {p4}, Lcom/discord/models/domain/ModelGuildIntegration;->getRoleId()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, Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
invoke-virtual {p4}, Lcom/discord/models/domain/ModelGuildIntegration;->isEnabled()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const-wide/16 v0, 0x20
|
|
|
|
invoke-virtual {p0}, Lcom/discord/models/domain/ModelUser;->isMfaEnabled()Z
|
|
|
|
move-result p0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild;->getMfaLevel()I
|
|
|
|
move-result v2
|
|
|
|
invoke-static {v0, v1, p3, p0, v2}, Lcom/discord/utilities/permissions/PermissionUtils;->canAndIsElevated(JLjava/lang/Long;ZI)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
const/4 p0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 p0, 0x0
|
|
|
|
:goto_0
|
|
new-instance p3, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;
|
|
|
|
invoke-direct {p3, p0, p1, p4, p2}, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;-><init>(ZLcom/discord/models/domain/ModelGuild;Lcom/discord/models/domain/ModelGuildIntegration;Lcom/discord/models/domain/ModelGuildRole;)V
|
|
|
|
return-object p3
|
|
|
|
:cond_2
|
|
:goto_1
|
|
const/4 p0, 0x0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static get(JJ)Lrx/Observable;
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(JJ)",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;",
|
|
">;"
|
|
}
|
|
.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 v1
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getGuilds()Lcom/discord/stores/StoreGuilds;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p0, p1}, Lcom/discord/stores/StoreGuilds;->observeGuild(J)Lrx/Observable;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getGuilds()Lcom/discord/stores/StoreGuilds;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p0, p1}, Lcom/discord/stores/StoreGuilds;->observeRoles(J)Lrx/Observable;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getPermissions()Lcom/discord/stores/StorePermissions;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p0, p1}, Lcom/discord/stores/StorePermissions;->getForGuild(J)Lrx/Observable;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getGuildIntegrations()Lcom/discord/stores/StoreGuildIntegrations;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p0, p1, p2, p3}, Lcom/discord/stores/StoreGuildIntegrations;->get(JJ)Lrx/Observable;
|
|
|
|
move-result-object v5
|
|
|
|
sget-object v6, Lf/a/o/e/g;->a:Lf/a/o/e/g;
|
|
|
|
invoke-static/range {v1 .. v6}, Lrx/Observable;->g(Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/Observable;Lrx/functions/Func5;)Lrx/Observable;
|
|
|
|
move-result-object p0
|
|
|
|
sget-object p1, Lf/a/b/r;->d:Lf/a/b/r;
|
|
|
|
invoke-virtual {p0, p1}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
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/WidgetServerSettingsEditIntegration$Model;
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public equals(Ljava/lang/Object;)Z
|
|
.locals 4
|
|
|
|
const/4 v0, 0x1
|
|
|
|
if-ne p1, p0, :cond_0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
instance-of v1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
return v2
|
|
|
|
:cond_1
|
|
check-cast p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;
|
|
|
|
invoke-virtual {p1, p0}, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;->canEqual(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
return v2
|
|
|
|
:cond_2
|
|
iget-boolean v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;->manageable:Z
|
|
|
|
iget-boolean v3, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;->manageable:Z
|
|
|
|
if-eq v1, v3, :cond_3
|
|
|
|
return v2
|
|
|
|
:cond_3
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;->guild:Lcom/discord/models/domain/ModelGuild;
|
|
|
|
iget-object v3, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;->guild:Lcom/discord/models/domain/ModelGuild;
|
|
|
|
if-nez v1, :cond_4
|
|
|
|
if-eqz v3, :cond_5
|
|
|
|
goto :goto_0
|
|
|
|
:cond_4
|
|
invoke-virtual {v1, v3}, Lcom/discord/models/domain/ModelGuild;->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/WidgetServerSettingsEditIntegration$Model;->integration:Lcom/discord/models/domain/ModelGuildIntegration;
|
|
|
|
iget-object v3, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;->integration:Lcom/discord/models/domain/ModelGuildIntegration;
|
|
|
|
if-nez v1, :cond_6
|
|
|
|
if-eqz v3, :cond_7
|
|
|
|
goto :goto_1
|
|
|
|
:cond_6
|
|
invoke-virtual {v1, v3}, Lcom/discord/models/domain/ModelGuildIntegration;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_7
|
|
|
|
:goto_1
|
|
return v2
|
|
|
|
:cond_7
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;->role:Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
iget-object p1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;->role:Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
if-nez v1, :cond_8
|
|
|
|
if-eqz p1, :cond_9
|
|
|
|
goto :goto_2
|
|
|
|
:cond_8
|
|
invoke-virtual {v1, p1}, Lcom/discord/models/domain/ModelGuildRole;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_9
|
|
|
|
:goto_2
|
|
return v2
|
|
|
|
:cond_9
|
|
return v0
|
|
.end method
|
|
|
|
.method public hashCode()I
|
|
.locals 4
|
|
|
|
iget-boolean v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;->manageable:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/16 v0, 0x4f
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/16 v0, 0x61
|
|
|
|
:goto_0
|
|
const/16 v1, 0x3b
|
|
|
|
add-int/2addr v0, v1
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;->guild:Lcom/discord/models/domain/ModelGuild;
|
|
|
|
mul-int/lit8 v0, v0, 0x3b
|
|
|
|
const/16 v3, 0x2b
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
const/16 v2, 0x2b
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelGuild;->hashCode()I
|
|
|
|
move-result v2
|
|
|
|
:goto_1
|
|
add-int/2addr v0, v2
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;->integration:Lcom/discord/models/domain/ModelGuildIntegration;
|
|
|
|
mul-int/lit8 v0, v0, 0x3b
|
|
|
|
if-nez v2, :cond_2
|
|
|
|
const/16 v2, 0x2b
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelGuildIntegration;->hashCode()I
|
|
|
|
move-result v2
|
|
|
|
:goto_2
|
|
add-int/2addr v0, v2
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;->role:Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
mul-int/lit8 v0, v0, 0x3b
|
|
|
|
if-nez v2, :cond_3
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelGuildRole;->hashCode()I
|
|
|
|
move-result v3
|
|
|
|
:goto_3
|
|
add-int/2addr v0, v3
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
const-string v0, "WidgetServerSettingsEditIntegration.Model(manageable="
|
|
|
|
invoke-static {v0}, Lf/e/b/a/a;->D(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object v0
|
|
|
|
iget-boolean v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;->manageable:Z
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, ", guild="
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;->guild:Lcom/discord/models/domain/ModelGuild;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, ", integration="
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;->integration:Lcom/discord/models/domain/ModelGuildIntegration;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, ", role="
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditIntegration$Model;->role:Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, ")"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|