2019-02-04 20:08:30 +00:00
|
|
|
.class public Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;
|
|
|
|
.super Lcom/discord/app/AppFragment;
|
2019-02-04 20:29:01 +00:00
|
|
|
.source "WidgetServerSettingsVanityUrl.java"
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field private static final ANIMATION_DURATION:J = 0xfaL
|
|
|
|
|
|
|
|
.field private static final INTENT_EXTRA_GUILD_ID:Ljava/lang/String; = "INTENT_EXTRA_GUILD_ID"
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
2019-05-03 18:53:54 +00:00
|
|
|
.field private currentUrl:Lcom/discord/app/AppTextView;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
.field private errorText:Landroid/widget/TextView;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
.field private loadingIndicator:Landroid/widget/ProgressBar;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
.field private remove:Landroid/widget/TextView;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
.field private urlPrefix:Landroid/widget/TextView;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
.field private vanityInput:Lcom/discord/app/AppEditText;
|
|
|
|
|
|
|
|
.field private vanityInputContainer:Landroid/view/View;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/app/AppFragment;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private configureInviteCode(Ljava/lang/String;)V
|
|
|
|
.locals 6
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->vanityInput:Lcom/discord/app/AppEditText;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/app/AppEditText;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->vanityInput:Lcom/discord/app/AppEditText;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/app/AppEditText;->clearFocus()V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->currentUrl:Lcom/discord/app/AppTextView;
|
|
|
|
|
|
|
|
const/16 v1, 0x8
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
|
|
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
|
|
|
|
invoke-static {p1}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v3, "https://discord.gg/"
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
invoke-virtual {v3, v0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iget-object v3, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->currentUrl:Lcom/discord/app/AppTextView;
|
|
|
|
|
2019-05-18 01:21:29 +00:00
|
|
|
const v4, 0x7f121141
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
const/4 v5, 0x1
|
|
|
|
|
|
|
|
new-array v5, v5, [Ljava/lang/Object;
|
|
|
|
|
|
|
|
aput-object v0, v5, v2
|
|
|
|
|
|
|
|
invoke-virtual {v3, v4, v5}, Lcom/discord/app/AppTextView;->a(I[Ljava/lang/Object;)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->currentUrl:Lcom/discord/app/AppTextView;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v2}, Lcom/discord/app/AppTextView;->setVisibility(I)V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->currentUrl:Lcom/discord/app/AppTextView;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/app/AppTextView;->setVisibility(I)V
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
:goto_0
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->remove:Landroid/widget/TextView;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
|
|
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private configureToolbar(Ljava/lang/String;)V
|
|
|
|
.locals 1
|
|
|
|
|
2019-05-18 01:21:29 +00:00
|
|
|
const v0, 0x7f120efc
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->setActionBarTitle(I)Lkotlin/Unit;
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->setActionBarSubtitle(Ljava/lang/CharSequence;)Lkotlin/Unit;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private configureUI(Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;)V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/app/AppActivity;->finish()V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->showLoadingUI(Z)V
|
|
|
|
|
|
|
|
iget-object v0, p1, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->guildName:Ljava/lang/String;
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->configureToolbar(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
iget-object v0, p1, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->vanityUrl:Ljava/lang/String;
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->configureInviteCode(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->vanityInput:Lcom/discord/app/AppEditText;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
new-instance v1, Lcom/discord/widgets/servers/-$$Lambda$WidgetServerSettingsVanityUrl$ni04VM3rIXfGPUJrRtXaWuADZNY;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
invoke-direct {v1, p0, p1}, Lcom/discord/widgets/servers/-$$Lambda$WidgetServerSettingsVanityUrl$ni04VM3rIXfGPUJrRtXaWuADZNY;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/app/AppEditText;->setOnEditorActionListener(Landroid/widget/TextView$OnEditorActionListener;)V
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->remove:Landroid/widget/TextView;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
new-instance v1, Lcom/discord/widgets/servers/-$$Lambda$WidgetServerSettingsVanityUrl$n90TsvSkF-QebkwB1-gN9TpAP6o;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
invoke-direct {v1, p0, p1}, Lcom/discord/widgets/servers/-$$Lambda$WidgetServerSettingsVanityUrl$n90TsvSkF-QebkwB1-gN9TpAP6o;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static create(Landroid/content/Context;J)V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getAnalytics()Lcom/discord/stores/StoreAnalytics;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "VANITY_URL"
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1, p1, p2}, Lcom/discord/stores/StoreAnalytics;->onGuildSettingsPaneViewed(Ljava/lang/String;J)V
|
|
|
|
|
|
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
|
|
|
|
|
|
|
|
const-string v1, "INTENT_EXTRA_GUILD_ID"
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1, p1, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;J)Landroid/content/Intent;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-class p2, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;
|
|
|
|
|
2019-03-30 08:05:33 +00:00
|
|
|
invoke-static {p0, p2, p1}, Lcom/discord/app/f;->a(Landroid/content/Context;Ljava/lang/Class;Landroid/content/Intent;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static synthetic lambda$kKm5vi-2QUB2bTge1K8TkK2nf3E(Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->configureUI(Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private onUpdatedVanityUrl(Ljava/lang/String;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->showLoadingUI(Z)V
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->hideKeyboard()V
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->configureInviteCode(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private showLoadingUI(Z)V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->loadingIndicator:Landroid/widget/ProgressBar;
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v1, 0x4
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->errorText:Landroid/widget/TextView;
|
|
|
|
|
|
|
|
const/16 v1, 0x8
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->remove:Landroid/widget/TextView;
|
|
|
|
|
|
|
|
xor-int/lit8 p1, p1, 0x1
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Landroid/widget/TextView;->setEnabled(Z)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private showUrlPrefix(Z)V
|
|
|
|
.locals 1
|
|
|
|
|
2019-04-16 23:08:16 +00:00
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->urlPrefix:Landroid/widget/TextView;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-04-16 23:08:16 +00:00
|
|
|
if-nez v0, :cond_0
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-04-16 23:08:16 +00:00
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
invoke-static {v0}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->translateToOriginX(Landroid/view/View;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->vanityInput:Lcom/discord/app/AppEditText;
|
|
|
|
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->translateToOriginX(Landroid/view/View;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
2019-04-16 23:08:16 +00:00
|
|
|
:cond_1
|
|
|
|
invoke-virtual {v0}, Landroid/widget/TextView;->getWidth()I
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->urlPrefix:Landroid/widget/TextView;
|
|
|
|
|
|
|
|
invoke-static {v0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->translateLeft(Landroid/view/View;I)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->vanityInput:Lcom/discord/app/AppEditText;
|
|
|
|
|
|
|
|
invoke-static {v0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->translateLeft(Landroid/view/View;I)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private static translateLeft(Landroid/view/View;I)V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/view/View;->animate()Landroid/view/ViewPropertyAnimator;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
neg-int p1, p1
|
|
|
|
|
|
|
|
int-to-float p1, p1
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Landroid/view/ViewPropertyAnimator;->translationXBy(F)Landroid/view/ViewPropertyAnimator;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
const-wide/16 v0, 0xfa
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0, v1}, Landroid/view/ViewPropertyAnimator;->setDuration(J)Landroid/view/ViewPropertyAnimator;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
new-instance p1, Landroid/view/animation/AccelerateDecelerateInterpolator;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Landroid/view/animation/AccelerateDecelerateInterpolator;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Landroid/view/ViewPropertyAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)Landroid/view/ViewPropertyAnimator;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/view/ViewPropertyAnimator;->start()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private static translateToOriginX(Landroid/view/View;)V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/view/View;->animate()Landroid/view/ViewPropertyAnimator;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0}, Landroid/view/ViewPropertyAnimator;->translationX(F)Landroid/view/ViewPropertyAnimator;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
const-wide/16 v0, 0xfa
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0, v1}, Landroid/view/ViewPropertyAnimator;->setDuration(J)Landroid/view/ViewPropertyAnimator;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
new-instance v0, Landroid/view/animation/AccelerateDecelerateInterpolator;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Landroid/view/animation/AccelerateDecelerateInterpolator;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {p0, v0}, Landroid/view/ViewPropertyAnimator;->setInterpolator(Landroid/animation/TimeInterpolator;)Landroid/view/ViewPropertyAnimator;
|
|
|
|
|
|
|
|
move-result-object p0
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Landroid/view/ViewPropertyAnimator;->start()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private updateVanityUrl(JLjava/lang/String;)V
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->showLoadingUI(Z)V
|
|
|
|
|
|
|
|
invoke-static {}, Lcom/discord/utilities/rest/RestAPI;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/restapi/RestAPIParams$VanityUrl;
|
|
|
|
|
|
|
|
invoke-direct {v1, p3}, Lcom/discord/restapi/RestAPIParams$VanityUrl;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1, p2, v1}, Lcom/discord/utilities/rest/RestAPI;->updateVanityUrl(JLcom/discord/restapi/RestAPIParams$VanityUrl;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-03-30 08:05:33 +00:00
|
|
|
invoke-static {}, Lcom/discord/app/h;->dv()Lrx/Observable$Transformer;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->a(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-03-30 08:05:33 +00:00
|
|
|
invoke-static {p0}, Lcom/discord/app/h;->b(Lcom/discord/app/AppComponent;)Lrx/Observable$Transformer;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->a(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
new-instance p2, Lcom/discord/widgets/servers/-$$Lambda$WidgetServerSettingsVanityUrl$BZ30CAyZOt-TFta637-fNK-TV-g;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
invoke-direct {p2, p0}, Lcom/discord/widgets/servers/-$$Lambda$WidgetServerSettingsVanityUrl$BZ30CAyZOt-TFta637-fNK-TV-g;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->getContext()Landroid/content/Context;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
new-instance v0, Lcom/discord/widgets/servers/-$$Lambda$WidgetServerSettingsVanityUrl$mf6o39Yd4Dj6JRbsjDZk8CQ0lF8;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
invoke-direct {v0, p0}, Lcom/discord/widgets/servers/-$$Lambda$WidgetServerSettingsVanityUrl$mf6o39Yd4Dj6JRbsjDZk8CQ0lF8;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-03-30 08:05:33 +00:00
|
|
|
invoke-static {p2, p3, v0}, Lcom/discord/app/h;->a(Lrx/functions/Action1;Landroid/content/Context;Lrx/functions/Action1;)Lrx/Observable$Transformer;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->a(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public getContentViewResId()I
|
|
|
|
.locals 1
|
|
|
|
|
2019-05-08 22:54:48 +00:00
|
|
|
const v0, 0x7f0d0174
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
.method public synthetic lambda$configureUI$2$WidgetServerSettingsVanityUrl(Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;Landroid/widget/TextView;ILandroid/view/KeyEvent;)Z
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 0
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
const/4 p2, 0x6
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
if-ne p3, p2, :cond_0
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
iget-wide p1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->guildId:J
|
|
|
|
|
|
|
|
iget-object p3, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->vanityInput:Lcom/discord/app/AppEditText;
|
|
|
|
|
|
|
|
invoke-virtual {p3}, Lcom/discord/app/AppEditText;->getText()Landroid/text/Editable;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
invoke-virtual {p3}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p3
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->updateVanityUrl(JLjava/lang/String;)V
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
|
|
|
return p1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
return p1
|
2019-02-04 20:08:30 +00:00
|
|
|
.end method
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
.method public synthetic lambda$configureUI$3$WidgetServerSettingsVanityUrl(Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;Landroid/view/View;)V
|
2019-02-04 20:08:30 +00:00
|
|
|
.locals 1
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
iget-wide p1, p1, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->guildId:J
|
2019-02-04 20:08:30 +00:00
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
const-string v0, ""
|
|
|
|
|
|
|
|
invoke-direct {p0, p1, p2, v0}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->updateVanityUrl(JLjava/lang/String;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public synthetic lambda$onViewBound$0$WidgetServerSettingsVanityUrl(Landroid/view/View;Z)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
xor-int/lit8 p1, p2, 0x1
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->showUrlPrefix(Z)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public synthetic lambda$onViewBound$1$WidgetServerSettingsVanityUrl(Landroid/view/View;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->vanityInput:Lcom/discord/app/AppEditText;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/app/AppEditText;->requestFocus()Z
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->showKeyboard()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
.method public synthetic lambda$updateVanityUrl$4$WidgetServerSettingsVanityUrl(Lcom/discord/models/domain/ModelGuild$VanityUrlResponse;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuild$VanityUrlResponse;->getCode()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->onUpdatedVanityUrl(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public synthetic lambda$updateVanityUrl$5$WidgetServerSettingsVanityUrl(Lcom/discord/utilities/error/Error;)V
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->showLoadingUI(Z)V
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lcom/discord/utilities/error/Error;->getResponse()Lcom/discord/utilities/error/Error$Response;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/error/Error$Response;->getCode()I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
const v2, 0xc364
|
|
|
|
|
|
|
|
if-ne v1, v2, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Lcom/discord/utilities/error/Error;->setShowErrorToasts(Z)V
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->errorText:Landroid/widget/TextView;
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/widget/TextView;->setVisibility(I)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
.method public onResume()V
|
|
|
|
.locals 4
|
|
|
|
|
|
|
|
invoke-super {p0}, Lcom/discord/app/AppFragment;->onResume()V
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->getMostRecentIntent()Landroid/content/Intent;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "INTENT_EXTRA_GUILD_ID"
|
|
|
|
|
|
|
|
const-wide/16 v2, -0x1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1, v2, v3}, Landroid/content/Intent;->getLongExtra(Ljava/lang/String;J)J
|
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
invoke-direct {p0, v2}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->showLoadingUI(Z)V
|
|
|
|
|
|
|
|
invoke-static {v0, v1}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl$Model;->access$000(J)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2019-03-30 08:05:33 +00:00
|
|
|
invoke-static {p0}, Lcom/discord/app/h;->b(Lcom/discord/app/AppComponent;)Lrx/Observable$Transformer;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/widgets/servers/-$$Lambda$WidgetServerSettingsVanityUrl$kKm5vi-2QUB2bTge1K8TkK2nf3E;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0}, Lcom/discord/widgets/servers/-$$Lambda$WidgetServerSettingsVanityUrl$kKm5vi-2QUB2bTge1K8TkK2nf3E;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;)V
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
2019-03-30 08:05:33 +00:00
|
|
|
invoke-static {v1, v2}, Lcom/discord/app/h;->a(Lrx/functions/Action1;Ljava/lang/Class;)Lrx/Observable$Transformer;
|
2019-02-04 20:08:30 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onViewBound(Landroid/view/View;)V
|
|
|
|
.locals 1
|
|
|
|
.param p1 # Landroid/view/View;
|
|
|
|
.annotation build Landroidx/annotation/NonNull;
|
|
|
|
.end annotation
|
|
|
|
.end param
|
|
|
|
|
|
|
|
invoke-super {p0, p1}, Lcom/discord/app/AppFragment;->onViewBound(Landroid/view/View;)V
|
|
|
|
|
2019-05-16 22:41:35 +00:00
|
|
|
const v0, 0x7f0a059f
|
2019-05-03 18:53:54 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Lcom/discord/app/AppEditText;
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->vanityInput:Lcom/discord/app/AppEditText;
|
|
|
|
|
2019-05-16 22:41:35 +00:00
|
|
|
const v0, 0x7f0a05a2
|
2019-05-03 18:53:54 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->vanityInputContainer:Landroid/view/View;
|
|
|
|
|
2019-05-16 22:41:35 +00:00
|
|
|
const v0, 0x7f0a05a3
|
2019-05-03 18:53:54 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Landroid/widget/ProgressBar;
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->loadingIndicator:Landroid/widget/ProgressBar;
|
|
|
|
|
2019-05-16 22:41:35 +00:00
|
|
|
const v0, 0x7f0a05a4
|
2019-05-03 18:53:54 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Landroid/widget/TextView;
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->urlPrefix:Landroid/widget/TextView;
|
|
|
|
|
2019-05-16 22:41:35 +00:00
|
|
|
const v0, 0x7f0a05a1
|
2019-05-03 18:53:54 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Landroid/widget/TextView;
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->errorText:Landroid/widget/TextView;
|
|
|
|
|
2019-05-16 22:41:35 +00:00
|
|
|
const v0, 0x7f0a05a0
|
2019-05-03 18:53:54 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Lcom/discord/app/AppTextView;
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->currentUrl:Lcom/discord/app/AppTextView;
|
|
|
|
|
2019-05-16 22:41:35 +00:00
|
|
|
const v0, 0x7f0a05a5
|
2019-05-03 18:53:54 +00:00
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
check-cast p1, Landroid/widget/TextView;
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->remove:Landroid/widget/TextView;
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->setActionBarDisplayHomeAsUpEnabled()Landroidx/appcompat/widget/Toolbar;
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->vanityInput:Lcom/discord/app/AppEditText;
|
|
|
|
|
|
|
|
const/4 v0, 0x1
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Lcom/discord/app/AppEditText;->setOnBackClearFocus(Z)V
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->vanityInput:Lcom/discord/app/AppEditText;
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/servers/-$$Lambda$WidgetServerSettingsVanityUrl$tLSDL-sF3oF-ZnwPoL8Pv8A3MxI;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0}, Lcom/discord/widgets/servers/-$$Lambda$WidgetServerSettingsVanityUrl$tLSDL-sF3oF-ZnwPoL8Pv8A3MxI;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;)V
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Lcom/discord/app/AppEditText;->setOnFocusChangeListener(Landroid/view/View$OnFocusChangeListener;)V
|
|
|
|
|
2019-05-03 18:53:54 +00:00
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;->vanityInputContainer:Landroid/view/View;
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/servers/-$$Lambda$WidgetServerSettingsVanityUrl$k2eS9N3KuPKliN4_Yp7uSgim-KQ;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0}, Lcom/discord/widgets/servers/-$$Lambda$WidgetServerSettingsVanityUrl$k2eS9N3KuPKliN4_Yp7uSgim-KQ;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsVanityUrl;)V
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
|
2019-02-04 20:08:30 +00:00
|
|
|
return-void
|
|
|
|
.end method
|