408 lines
12 KiB
Smali
408 lines
12 KiB
Smali
.class public final Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;
|
|
.super Ljava/lang/Object;
|
|
.source "WidgetServerSettingsOverview.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingClass;
|
|
value = Lcom/discord/widgets/servers/WidgetServerSettingsOverview;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = "Model"
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model$VoiceRegion;,
|
|
Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Companion:Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model$Companion;
|
|
|
|
|
|
# instance fields
|
|
.field public final afkChannelModel:Lcom/discord/models/domain/ModelChannel;
|
|
|
|
.field public final approximateMemberCount:Ljava/lang/Integer;
|
|
|
|
.field public final canManage:Z
|
|
|
|
.field public final guild:Lcom/discord/models/domain/ModelGuild;
|
|
|
|
.field public final isAboveNotifyAllSize:Z
|
|
|
|
.field public final isOwner:Z
|
|
|
|
.field public final selectedVoiceRegionName:Ljava/lang/String;
|
|
|
|
.field public final systemChannelModel:Lcom/discord/models/domain/ModelChannel;
|
|
|
|
.field public final voiceRegions:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model$VoiceRegion;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->Companion:Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model$Companion;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcom/discord/models/domain/ModelGuild;Lcom/discord/models/domain/ModelUser;Ljava/util/List;Lcom/discord/models/domain/ModelChannel;Lcom/discord/models/domain/ModelChannel;Ljava/lang/Long;Lcom/discord/stores/StoreGuildProfiles$GuildProfileData;)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lcom/discord/models/domain/ModelGuild;",
|
|
"Lcom/discord/models/domain/ModelUser;",
|
|
"Ljava/util/List<",
|
|
"+",
|
|
"Lcom/discord/models/domain/ModelVoiceRegion;",
|
|
">;",
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
"Ljava/lang/Long;",
|
|
"Lcom/discord/stores/StoreGuildProfiles$GuildProfileData;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "guild"
|
|
|
|
invoke-static {p1, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "me"
|
|
|
|
invoke-static {p2, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "regions"
|
|
|
|
invoke-static {p3, v0}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->guild:Lcom/discord/models/domain/ModelGuild;
|
|
|
|
iput-object p4, p0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->afkChannelModel:Lcom/discord/models/domain/ModelChannel;
|
|
|
|
iput-object p5, p0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->systemChannelModel:Lcom/discord/models/domain/ModelChannel;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide p4
|
|
|
|
invoke-virtual {p1, p4, p5}, Lcom/discord/models/domain/ModelGuild;->isOwner(J)Z
|
|
|
|
move-result p1
|
|
|
|
iput-boolean p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->isOwner:Z
|
|
|
|
const/4 p1, 0x0
|
|
|
|
if-eqz p7, :cond_0
|
|
|
|
invoke-virtual {p7}, Lcom/discord/stores/StoreGuildProfiles$GuildProfileData;->getData()Lcom/discord/models/domain/ModelGuildPreview;
|
|
|
|
move-result-object p4
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
invoke-virtual {p4}, Lcom/discord/models/domain/ModelGuildPreview;->getApproximateMemberCount()Ljava/lang/Integer;
|
|
|
|
move-result-object p4
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object p4, p1
|
|
|
|
:goto_0
|
|
iput-object p4, p0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->approximateMemberCount:Ljava/lang/Integer;
|
|
|
|
iget-boolean p4, p0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->isOwner:Z
|
|
|
|
const/4 p5, 0x0
|
|
|
|
const/4 p7, 0x1
|
|
|
|
if-nez p4, :cond_2
|
|
|
|
const-wide/16 v0, 0x20
|
|
|
|
invoke-virtual {p2}, Lcom/discord/models/domain/ModelUser;->isMfaEnabled()Z
|
|
|
|
move-result p2
|
|
|
|
iget-object p4, p0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->guild:Lcom/discord/models/domain/ModelGuild;
|
|
|
|
invoke-virtual {p4}, Lcom/discord/models/domain/ModelGuild;->getMfaLevel()I
|
|
|
|
move-result p4
|
|
|
|
invoke-static {v0, v1, p6, p2, p4}, Lcom/discord/utilities/permissions/PermissionUtils;->canAndIsElevated(JLjava/lang/Long;ZI)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const/4 p2, 0x0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_2
|
|
:goto_1
|
|
const/4 p2, 0x1
|
|
|
|
:goto_2
|
|
iput-boolean p2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->canManage:Z
|
|
|
|
invoke-interface {p3}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p2
|
|
|
|
:cond_3
|
|
invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result p4
|
|
|
|
if-eqz p4, :cond_4
|
|
|
|
invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object p4
|
|
|
|
move-object p6, p4
|
|
|
|
check-cast p6, Lcom/discord/models/domain/ModelVoiceRegion;
|
|
|
|
invoke-virtual {p6}, Lcom/discord/models/domain/ModelVoiceRegion;->getId()Ljava/lang/String;
|
|
|
|
move-result-object p6
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->guild:Lcom/discord/models/domain/ModelGuild;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuild;->getRegion()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p6, v0}, Lc0/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result p6
|
|
|
|
if-eqz p6, :cond_3
|
|
|
|
goto :goto_3
|
|
|
|
:cond_4
|
|
move-object p4, p1
|
|
|
|
:goto_3
|
|
check-cast p4, Lcom/discord/models/domain/ModelVoiceRegion;
|
|
|
|
if-eqz p4, :cond_5
|
|
|
|
invoke-virtual {p4}, Lcom/discord/models/domain/ModelVoiceRegion;->getName()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
goto :goto_4
|
|
|
|
:cond_5
|
|
move-object p2, p1
|
|
|
|
:goto_4
|
|
iput-object p2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->selectedVoiceRegionName:Ljava/lang/String;
|
|
|
|
new-instance p2, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {p2}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
invoke-interface {p3}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p3
|
|
|
|
:cond_6
|
|
:goto_5
|
|
invoke-interface {p3}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result p4
|
|
|
|
if-eqz p4, :cond_8
|
|
|
|
invoke-interface {p3}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object p4
|
|
|
|
check-cast p4, Lcom/discord/models/domain/ModelVoiceRegion;
|
|
|
|
invoke-virtual {p4}, Lcom/discord/models/domain/ModelVoiceRegion;->isDeprecated()Z
|
|
|
|
move-result p6
|
|
|
|
if-nez p6, :cond_7
|
|
|
|
new-instance p6, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model$VoiceRegion;
|
|
|
|
invoke-virtual {p4}, Lcom/discord/models/domain/ModelVoiceRegion;->getId()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "it.id"
|
|
|
|
invoke-static {v0, v1}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {p4}, Lcom/discord/models/domain/ModelVoiceRegion;->getName()Ljava/lang/String;
|
|
|
|
move-result-object p4
|
|
|
|
const-string v1, "it.name"
|
|
|
|
invoke-static {p4, v1}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p6, v0, p4}, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model$VoiceRegion;-><init>(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
goto :goto_6
|
|
|
|
:cond_7
|
|
move-object p6, p1
|
|
|
|
:goto_6
|
|
if-eqz p6, :cond_6
|
|
|
|
invoke-interface {p2, p6}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_5
|
|
|
|
:cond_8
|
|
sget-object p1, Ljava/lang/String;->CASE_INSENSITIVE_ORDER:Ljava/util/Comparator;
|
|
|
|
const-string p3, "java.lang.String.CASE_INSENSITIVE_ORDER"
|
|
|
|
invoke-static {p1, p3}, Lc0/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
new-instance p3, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model$$special$$inlined$compareBy$1;
|
|
|
|
invoke-direct {p3, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model$$special$$inlined$compareBy$1;-><init>(Ljava/util/Comparator;)V
|
|
|
|
invoke-static {p2, p3}, Lc0/i/f;->sortedWith(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->voiceRegions:Ljava/util/List;
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->approximateMemberCount:Ljava/lang/Integer;
|
|
|
|
if-eqz p1, :cond_9
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result p1
|
|
|
|
const/16 p2, 0x9c4
|
|
|
|
if-le p1, p2, :cond_9
|
|
|
|
const/4 p5, 0x1
|
|
|
|
:cond_9
|
|
iput-boolean p5, p0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->isAboveNotifyAllSize:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final getAfkChannelModel()Lcom/discord/models/domain/ModelChannel;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->afkChannelModel:Lcom/discord/models/domain/ModelChannel;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getCanManage()Z
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->canManage:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->guild:Lcom/discord/models/domain/ModelGuild;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getSystemChannelModel()Lcom/discord/models/domain/ModelChannel;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->systemChannelModel:Lcom/discord/models/domain/ModelChannel;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getVoiceRegion()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->selectedVoiceRegionName:Ljava/lang/String;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getVoiceRegions()Ljava/util/List;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model$VoiceRegion;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->voiceRegions:Ljava/util/List;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final isAboveNotifyAllSize()Z
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->isAboveNotifyAllSize:Z
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public final isOwner()Z
|
|
.locals 1
|
|
|
|
iget-boolean v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsOverview$Model;->isOwner:Z
|
|
|
|
return v0
|
|
.end method
|