462 lines
15 KiB
Smali
462 lines
15 KiB
Smali
.class public final Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;
|
|
.super Landroid/widget/FrameLayout;
|
|
.source "ConnectionsGuildIntegrationView.kt"
|
|
|
|
|
|
# static fields
|
|
.field public static final synthetic $$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
|
|
# instance fields
|
|
.field public final error$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final guildHandle$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final guildIcon$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final guildName$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
.field public final joinGuild$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 5
|
|
|
|
const/4 v0, 0x5
|
|
|
|
new-array v0, v0, [Lkotlin/reflect/KProperty;
|
|
|
|
const-class v1, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;
|
|
|
|
const-string v2, "guildName"
|
|
|
|
const-string v3, "getGuildName()Landroid/widget/TextView;"
|
|
|
|
const/4 v4, 0x0
|
|
|
|
invoke-static {v1, v2, v3, v4}, Lf/e/c/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lz/n/c/s;
|
|
|
|
move-result-object v1
|
|
|
|
aput-object v1, v0, v4
|
|
|
|
const-class v1, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;
|
|
|
|
const-string v2, "guildHandle"
|
|
|
|
const-string v3, "getGuildHandle()Landroid/widget/TextView;"
|
|
|
|
invoke-static {v1, v2, v3, v4}, Lf/e/c/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lz/n/c/s;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-class v1, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;
|
|
|
|
const-string v2, "guildIcon"
|
|
|
|
const-string v3, "getGuildIcon()Lcom/facebook/drawee/view/SimpleDraweeView;"
|
|
|
|
invoke-static {v1, v2, v3, v4}, Lf/e/c/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lz/n/c/s;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x2
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-class v1, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;
|
|
|
|
const-string v2, "error"
|
|
|
|
const-string v3, "getError()Landroid/widget/TextView;"
|
|
|
|
invoke-static {v1, v2, v3, v4}, Lf/e/c/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lz/n/c/s;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x3
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-class v1, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;
|
|
|
|
const-string v2, "joinGuild"
|
|
|
|
const-string v3, "getJoinGuild()Landroid/widget/Button;"
|
|
|
|
invoke-static {v1, v2, v3, v4}, Lf/e/c/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lz/n/c/s;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x4
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sput-object v0, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 1
|
|
|
|
const-string v0, "context"
|
|
|
|
invoke-static {p1, v0}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0, p1, p2}, Landroid/widget/FrameLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
|
|
const p2, 0x7f0a0bb4
|
|
|
|
invoke-static {p0, p2}, Lz/i/s;->g(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p2
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->guildName$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p2, 0x7f0a0bb1
|
|
|
|
invoke-static {p0, p2}, Lz/i/s;->g(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p2
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->guildHandle$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p2, 0x7f0a0bb2
|
|
|
|
invoke-static {p0, p2}, Lz/i/s;->g(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p2
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->guildIcon$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p2, 0x7f0a0bb3
|
|
|
|
invoke-static {p0, p2}, Lz/i/s;->g(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p2
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->error$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p2, 0x7f0a0bb5
|
|
|
|
invoke-static {p0, p2}, Lz/i/s;->g(Landroid/view/View;I)Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
move-result-object p2
|
|
|
|
iput-object p2, p0, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->joinGuild$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
const p2, 0x7f0d0129
|
|
|
|
invoke-static {p1, p2, p0}, Landroid/widget/FrameLayout;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final getError()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->error$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x3
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/TextView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getGuildHandle()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->guildHandle$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/TextView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getGuildIcon()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->guildIcon$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x2
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getGuildName()Landroid/widget/TextView;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->guildName$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/TextView;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private final getJoinGuild()Landroid/widget/Button;
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->joinGuild$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
sget-object v1, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
const/4 v2, 0x4
|
|
|
|
aget-object v1, v1, v2
|
|
|
|
invoke-interface {v0, p0, v1}, Lkotlin/properties/ReadOnlyProperty;->getValue(Ljava/lang/Object;Lkotlin/reflect/KProperty;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/Button;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final setIntegrationData(Lcom/discord/models/domain/ModelConnectedAccountIntegration;Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnectionsViewModel$JoinStatus;)V
|
|
.locals 18
|
|
|
|
move-object/from16 v0, p2
|
|
|
|
const-string v1, "integration"
|
|
|
|
move-object/from16 v2, p1
|
|
|
|
invoke-static {v2, v1}, Lz/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->getGuildHandle()Landroid/widget/TextView;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelConnectedAccountIntegration;->getDisplayName()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v1, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-virtual/range {p1 .. p1}, Lcom/discord/models/domain/ModelConnectedAccountIntegration;->getGuild()Lcom/discord/models/domain/ModelConnectedIntegrationGuild;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->getGuildName()Landroid/widget/TextView;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelConnectedIntegrationGuild;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v2, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelConnectedIntegrationGuild;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelConnectedIntegrationGuild;->getIcon()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/widget/FrameLayout;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v1
|
|
|
|
const v2, 0x7f07006b
|
|
|
|
invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I
|
|
|
|
move-result v1
|
|
|
|
invoke-static {v1}, Lcom/discord/utilities/icon/IconUtils;->getMediaProxySize(I)I
|
|
|
|
move-result v1
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v8
|
|
|
|
const/16 v9, 0xc
|
|
|
|
const/4 v10, 0x0
|
|
|
|
invoke-static/range {v4 .. v10}, Lcom/discord/utilities/icon/IconUtils;->getForGuild$default(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;ZLjava/lang/Integer;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v12
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->getGuildIcon()Lcom/facebook/drawee/view/SimpleDraweeView;
|
|
|
|
move-result-object v11
|
|
|
|
const/4 v13, 0x0
|
|
|
|
const/4 v14, 0x0
|
|
|
|
const/4 v15, 0x0
|
|
|
|
const/16 v16, 0x1c
|
|
|
|
const/16 v17, 0x0
|
|
|
|
invoke-static/range {v11 .. v17}, Lcom/discord/utilities/icon/IconUtils;->setIcon$default(Landroid/widget/ImageView;Ljava/lang/String;ILkotlin/jvm/functions/Function1;Lcom/discord/utilities/images/MGImages$ChangeDetector;ILjava/lang/Object;)V
|
|
|
|
:cond_0
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->getJoinGuild()Landroid/widget/Button;
|
|
|
|
move-result-object v1
|
|
|
|
instance-of v2, v0, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnectionsViewModel$JoinStatus$Joining;
|
|
|
|
xor-int/lit8 v2, v2, 0x1
|
|
|
|
invoke-virtual {v1, v2}, Landroid/widget/Button;->setEnabled(Z)V
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->getJoinGuild()Landroid/widget/Button;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnectionsViewModel$JoinStatus$Joining;->INSTANCE:Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnectionsViewModel$JoinStatus$Joining;
|
|
|
|
invoke-static {v0, v2}, Lz/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-virtual/range {p0 .. p0}, Landroid/widget/FrameLayout;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v2
|
|
|
|
const v3, 0x7f120e6d
|
|
|
|
invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
invoke-virtual/range {p0 .. p0}, Landroid/widget/FrameLayout;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v2
|
|
|
|
const v3, 0x7f120e51
|
|
|
|
invoke-virtual {v2, v3}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
:goto_0
|
|
invoke-virtual {v1, v2}, Landroid/widget/Button;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->getError()Landroid/widget/TextView;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnectionsViewModel$JoinStatus$JoinFailed;->INSTANCE:Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnectionsViewModel$JoinStatus$JoinFailed;
|
|
|
|
invoke-static {v0, v2}, Lz/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
const/4 v2, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const/16 v2, 0x8
|
|
|
|
:goto_1
|
|
invoke-virtual {v1, v2}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->getJoinGuild()Landroid/widget/Button;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnectionsViewModel$JoinStatus$Joined;->INSTANCE:Lcom/discord/widgets/settings/connections/WidgetSettingsUserConnectionsViewModel$JoinStatus$Joined;
|
|
|
|
invoke-static {v0, v2}, Lz/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
const/4 v3, 0x4
|
|
|
|
:cond_3
|
|
invoke-virtual {v1, v3}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setJoinClickListener(Landroid/view/View$OnClickListener;)V
|
|
.locals 1
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/settings/connections/ConnectionsGuildIntegrationView;->getJoinGuild()Landroid/widget/Button;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
return-void
|
|
.end method
|