2020-05-17 12:40:10 +00:00
|
|
|
.class public final Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;
|
|
|
|
.super Lcom/discord/app/AppFragment;
|
|
|
|
.source "WidgetServerSettingsEmojisEdit.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
|
|
value = {
|
|
|
|
Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit$Companion;
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final synthetic $$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
|
|
|
|
.field public static final Companion:Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit$Companion;
|
|
|
|
|
|
|
|
.field public static final EMOJI_RE:Lkotlin/text/Regex;
|
|
|
|
|
|
|
|
.field public static final EXTRA_EMOJI_ALIAS:Ljava/lang/String; = "EXTRA_EMOJI_ALIAS"
|
|
|
|
|
|
|
|
.field public static final EXTRA_EMOJI_ID:Ljava/lang/String; = "EXTRA_EMOJI_ID"
|
|
|
|
|
|
|
|
.field public static final EXTRA_GUILD_ID:Ljava/lang/String; = "EXTRA_GUILD_ID"
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final editAlias$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
|
|
.field public emojiId:J
|
|
|
|
|
|
|
|
.field public emojiName:Ljava/lang/String;
|
|
|
|
|
|
|
|
.field public guildId:J
|
|
|
|
|
|
|
|
.field public final saveAlias$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
|
|
.field public final state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public static constructor <clinit>()V
|
2020-07-08 16:44:49 +00:00
|
|
|
.locals 5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v0, 0x2
|
|
|
|
|
|
|
|
new-array v0, v0, [Lkotlin/reflect/KProperty;
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-class v1, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v2, "editAlias"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v3, "getEditAlias()Lcom/google/android/material/textfield/TextInputLayout;"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const/4 v4, 0x0
|
2020-09-08 08:16:32 +00:00
|
|
|
|
2020-09-22 06:09:03 +00:00
|
|
|
invoke-static {v1, v2, v3, v4}, Lf/e/b/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lk0/n/c/r;
|
2020-09-08 08:16:32 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
move-result-object v1
|
2020-09-08 08:16:32 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
aput-object v1, v0, v4
|
2020-09-08 08:16:32 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-class v1, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;
|
2020-09-16 21:45:36 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v2, "saveAlias"
|
2020-09-16 21:45:36 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v3, "getSaveAlias()Lcom/google/android/material/floatingactionbutton/FloatingActionButton;"
|
2020-09-16 21:45:36 +00:00
|
|
|
|
2020-09-22 06:09:03 +00:00
|
|
|
invoke-static {v1, v2, v3, v4}, Lf/e/b/a/a;->L(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;I)Lk0/n/c/r;
|
2020-09-16 21:45:36 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
move-result-object v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v2, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
aput-object v1, v0, v2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->$$delegatedProperties:[Lkotlin/reflect/KProperty;
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit$Companion;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->Companion:Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit$Companion;
|
|
|
|
|
|
|
|
new-instance v0, Lkotlin/text/Regex;
|
|
|
|
|
|
|
|
const-string v1, "[^A-Za-z0-9_]"
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Lkotlin/text/Regex;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
sput-object v0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->EMOJI_RE:Lkotlin/text/Regex;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 4
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/app/AppFragment;-><init>()V
|
|
|
|
|
2020-09-22 06:09:03 +00:00
|
|
|
const v0, 0x7f0a084e
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-22 06:09:03 +00:00
|
|
|
invoke-static {p0, v0}, Lk0/j/a;->i(Landroidx/fragment/app/Fragment;I)Lkotlin/properties/ReadOnlyProperty;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->editAlias$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
2020-09-22 06:09:03 +00:00
|
|
|
const v1, 0x7f0a084f
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-22 06:09:03 +00:00
|
|
|
invoke-static {p0, v1}, Lk0/j/a;->i(Landroidx/fragment/app/Fragment;I)Lkotlin/properties/ReadOnlyProperty;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->saveAlias$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
new-array v2, v2, [I
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
aput v0, v2, v3
|
|
|
|
|
|
|
|
invoke-direct {v1, v2}, Lcom/discord/utilities/stateful/StatefulViews;-><init>([I)V
|
|
|
|
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
|
|
|
|
const-wide/16 v0, -0x1
|
|
|
|
|
|
|
|
iput-wide v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->guildId:J
|
|
|
|
|
|
|
|
iput-wide v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->emojiId:J
|
|
|
|
|
|
|
|
const-string v0, ""
|
|
|
|
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->emojiName:Ljava/lang/String;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$deleteEmoji(Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->deleteEmoji()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getEmojiId$p(Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;)J
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
iget-wide v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->emojiId:J
|
|
|
|
|
|
|
|
return-wide v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$getGuildId$p(Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;)J
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
iget-wide v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->guildId:J
|
|
|
|
|
|
|
|
return-wide v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$handleSaveAlias(Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->handleSaveAlias()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$onSaveSuccess(Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;Ljava/lang/String;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->onSaveSuccess(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$setEmojiId$p(Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;J)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput-wide p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->emojiId:J
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final synthetic access$setGuildId$p(Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;J)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput-wide p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->guildId:J
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final configureMenu()V
|
|
|
|
.locals 6
|
|
|
|
|
|
|
|
new-instance v2, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit$configureMenu$1;
|
|
|
|
|
|
|
|
invoke-direct {v2, p0}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit$configureMenu$1;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;)V
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const v1, 0x7f0e0015
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
const/4 v4, 0x4
|
|
|
|
|
|
|
|
const/4 v5, 0x0
|
|
|
|
|
|
|
|
move-object v0, p0
|
|
|
|
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/app/AppFragment;->setActionBarOptionsMenu$default(Lcom/discord/app/AppFragment;ILrx/functions/Action2;Lrx/functions/Action1;ILjava/lang/Object;)Landroidx/appcompat/widget/Toolbar;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final configureToolbar(Ljava/lang/String;)V
|
|
|
|
.locals 1
|
|
|
|
|
2020-09-22 06:09:03 +00:00
|
|
|
const v0, 0x7f120607
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p0, v0}, Lcom/discord/app/AppFragment;->setActionBarTitle(I)Lkotlin/Unit;
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/app/AppFragment;->setActionBarSubtitle(Ljava/lang/CharSequence;)Lkotlin/Unit;
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public static final create(Landroid/content/Context;JJLjava/lang/String;)V
|
|
|
|
.locals 7
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->Companion:Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit$Companion;
|
|
|
|
|
|
|
|
move-object v1, p0
|
|
|
|
|
|
|
|
move-wide v2, p1
|
|
|
|
|
|
|
|
move-wide v4, p3
|
|
|
|
|
|
|
|
move-object v6, p5
|
|
|
|
|
|
|
|
invoke-virtual/range {v0 .. v6}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit$Companion;->create(Landroid/content/Context;JJLjava/lang/String;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final deleteEmoji()V
|
|
|
|
.locals 8
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v0, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v1, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {p0, v0, v1, v0}, Lcom/discord/app/AppFragment;->hideKeyboard$default(Lcom/discord/app/AppFragment;Landroid/view/View;ILjava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {v2, v3, v1, v0}, Lcom/discord/utilities/stateful/StatefulViews;->clear$default(Lcom/discord/utilities/stateful/StatefulViews;ZILjava/lang/Object;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
sget-object v2, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
iget-wide v4, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->guildId:J
|
|
|
|
|
|
|
|
iget-wide v6, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->emojiId:J
|
|
|
|
|
|
|
|
invoke-virtual {v2, v4, v5, v6, v7}, Lcom/discord/utilities/rest/RestAPI;->deleteGuildEmoji(JJ)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {v2, v3, v1, v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-object v1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v2, 0x2
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {v1, p0, v0, v2, v0}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui$default(Lrx/Observable;Lcom/discord/app/AppComponent;Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;ILjava/lang/Object;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit$deleteEmoji$1;
|
|
|
|
|
|
|
|
invoke-direct {v1, p0}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit$deleteEmoji$1;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;)V
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-static {v1, p0}, Lf/a/b/s;->o(Lrx/functions/Action1;Lcom/discord/app/AppFragment;)Lrx/Observable$c;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
.method private final getEditAlias()Lcom/google/android/material/textfield/TextInputLayout;
|
2020-05-17 12:40:10 +00:00
|
|
|
.locals 3
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->editAlias$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->$$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
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
check-cast v0, Lcom/google/android/material/textfield/TextInputLayout;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final getSaveAlias()Lcom/google/android/material/floatingactionbutton/FloatingActionButton;
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->saveAlias$delegate:Lkotlin/properties/ReadOnlyProperty;
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->$$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, Lcom/google/android/material/floatingactionbutton/FloatingActionButton;
|
|
|
|
|
|
|
|
return-object v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final handleSaveAlias()V
|
|
|
|
.locals 7
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->getEditAlias()Lcom/google/android/material/textfield/TextInputLayout;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {v0}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getTextOrEmpty(Lcom/google/android/material/textfield/TextInputLayout;)Ljava/lang/String;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->sanitizeEmojiName(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
new-instance v6, Lcom/discord/restapi/RestAPIParams$PatchGuildEmoji;
|
|
|
|
|
|
|
|
invoke-direct {v6, v0}, Lcom/discord/restapi/RestAPIParams$PatchGuildEmoji;-><init>(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/utilities/rest/RestAPI;->Companion:Lcom/discord/utilities/rest/RestAPI$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/rest/RestAPI$Companion;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
iget-wide v2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->guildId:J
|
|
|
|
|
|
|
|
iget-wide v4, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->emojiId:J
|
|
|
|
|
|
|
|
invoke-virtual/range {v1 .. v6}, Lcom/discord/utilities/rest/RestAPI;->patchGuildEmoji(JJLcom/discord/restapi/RestAPIParams$PatchGuildEmoji;)Lrx/Observable;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v3, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v4, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {v1, v2, v3, v4}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->restSubscribeOn$default(Lrx/Observable;ZILjava/lang/Object;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const/4 v2, 0x2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {v1, p0, v4, v2, v4}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->ui$default(Lrx/Observable;Lcom/discord/app/AppComponent;Lcom/discord/utilities/mg_recycler/MGRecyclerAdapterSimple;ILjava/lang/Object;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
new-instance v2, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit$handleSaveAlias$1;
|
|
|
|
|
|
|
|
invoke-direct {v2, p0, v0}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit$handleSaveAlias$1;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;Ljava/lang/String;)V
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-static {v2, p0}, Lf/a/b/s;->o(Lrx/functions/Action1;Lcom/discord/app/AppFragment;)Lrx/Observable$c;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v1, v0}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final onSaveSuccess(Ljava/lang/String;)V
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
|
|
|
invoke-static {p0, v0, v1, v0}, Lcom/discord/app/AppFragment;->hideKeyboard$default(Lcom/discord/app/AppFragment;Landroid/view/View;ILjava/lang/Object;)V
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->configureToolbar(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreStream$Companion;->getGuildEmojis()Lcom/discord/stores/StoreEmojiGuild;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iget-wide v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->guildId:J
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/discord/stores/StoreEmojiGuild;->get(J)Lrx/Observable;
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->getEditAlias()Lcom/google/android/material/textfield/TextInputLayout;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v1}, Landroid/widget/LinearLayout;->getId()I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1, p1}, Lcom/discord/utilities/stateful/StatefulViews;->put(ILjava/lang/Object;)V
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->getEditAlias()Lcom/google/android/material/textfield/TextInputLayout;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->getEditAlias()Lcom/google/android/material/textfield/TextInputLayout;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v2}, Landroid/widget/LinearLayout;->getId()I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
invoke-virtual {v1, v2, p1}, Lcom/discord/utilities/stateful/StatefulViews;->get(ILjava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
check-cast p1, Ljava/lang/CharSequence;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {v0, p1}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setText(Lcom/google/android/material/textfield/TextInputLayout;Ljava/lang/CharSequence;)Lkotlin/Unit;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-22 06:09:03 +00:00
|
|
|
const p1, 0x7f121418
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
const/4 v1, 0x4
|
|
|
|
|
2020-09-02 04:07:20 +00:00
|
|
|
invoke-static {p0, p1, v0, v1}, Lf/a/b/p;->m(Landroidx/fragment/app/Fragment;Ljava/lang/CharSequence;II)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method private final sanitizeEmojiName(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
.locals 2
|
|
|
|
|
|
|
|
sget-object v0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->EMOJI_RE:Lkotlin/text/Regex;
|
|
|
|
|
|
|
|
const-string v1, ""
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1, v1}, Lkotlin/text/Regex;->replace(Ljava/lang/CharSequence;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-virtual {p1}, Ljava/lang/String;->length()I
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
const/4 v1, 0x2
|
|
|
|
|
|
|
|
if-ge v0, v1, :cond_0
|
|
|
|
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const/16 p1, 0x5f
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public getContentViewResId()I
|
|
|
|
.locals 1
|
|
|
|
|
2020-09-22 06:09:03 +00:00
|
|
|
const v0, 0x7f0d0256
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onActivityCreated(Landroid/os/Bundle;)V
|
2020-07-25 00:57:58 +00:00
|
|
|
.locals 2
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-super {p0, p1}, Landroidx/fragment/app/Fragment;->onActivityCreated(Landroid/os/Bundle;)V
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
const/4 p1, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
const/4 v0, 0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
const/4 v1, 0x0
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p0, p1, v0, v1}, Lcom/discord/app/AppFragment;->setActionBarDisplayHomeAsUpEnabled$default(Lcom/discord/app/AppFragment;ZILjava/lang/Object;)Landroidx/appcompat/widget/Toolbar;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onViewBound(Landroid/view/View;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
.locals 5
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
const-string v0, "view"
|
|
|
|
|
2020-09-22 06:09:03 +00:00
|
|
|
invoke-static {p1, v0}, Lk0/n/c/i;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-super {p0, p1}, Lcom/discord/app/AppFragment;->onViewBound(Landroid/view/View;)V
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getMostRecentIntent()Landroid/content/Intent;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v0, "EXTRA_GUILD_ID"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-wide/16 v1, -0x1
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1, v0, v1, v2}, Landroid/content/Intent;->getLongExtra(Ljava/lang/String;J)J
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
move-result-wide v3
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
iput-wide v3, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->guildId:J
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getMostRecentIntent()Landroid/content/Intent;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
const-string v0, "EXTRA_EMOJI_ID"
|
2020-05-17 12:40:10 +00:00
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1, v0, v1, v2}, Landroid/content/Intent;->getLongExtra(Ljava/lang/String;J)J
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-wide v0
|
|
|
|
|
|
|
|
iput-wide v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->emojiId:J
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getMostRecentIntent()Landroid/content/Intent;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
const-string v0, "EXTRA_EMOJI_ALIAS"
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const-string p1, ""
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->emojiName:Ljava/lang/String;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->getEditAlias()Lcom/google/android/material/textfield/TextInputLayout;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->getEditAlias()Lcom/google/android/material/textfield/TextInputLayout;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {v1}, Landroid/widget/LinearLayout;->getId()I
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->emojiName:Ljava/lang/String;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/discord/utilities/stateful/StatefulViews;->get(ILjava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Ljava/lang/CharSequence;
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-static {p1, v0}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setText(Lcom/google/android/material/textfield/TextInputLayout;Ljava/lang/CharSequence;)Lkotlin/Unit;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
|
|
|
|
invoke-virtual {p1, p0}, Lcom/discord/utilities/stateful/StatefulViews;->setupUnsavedChangesConfirmation(Lcom/discord/app/AppFragment;)V
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->getSaveAlias()Lcom/google/android/material/floatingactionbutton/FloatingActionButton;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const/4 v1, 0x1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
new-array v1, v1, [Landroid/view/View;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->getEditAlias()Lcom/google/android/material/textfield/TextInputLayout;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
aput-object v3, v1, v2
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-virtual {p1, p0, v0, v1}, Lcom/discord/utilities/stateful/StatefulViews;->setupTextWatcherWithSaveAction(Lcom/discord/app/AppFragment;Landroid/view/View;[Landroid/view/View;)V
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->getSaveAlias()Lcom/google/android/material/floatingactionbutton/FloatingActionButton;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Lcom/discord/utilities/stateful/StatefulViews;->configureSaveActionView(Landroid/view/View;)V
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->getSaveAlias()Lcom/google/android/material/floatingactionbutton/FloatingActionButton;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
new-instance v0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit$onViewBound$1;
|
|
|
|
|
|
|
|
invoke-direct {v0, p0}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit$onViewBound$1;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;)V
|
|
|
|
|
|
|
|
invoke-virtual {p1, v0}, Landroid/widget/ImageButton;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->emojiName:Ljava/lang/String;
|
|
|
|
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->configureToolbar(Ljava/lang/String;)V
|
|
|
|
|
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->configureMenu()V
|
|
|
|
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->isRecreated()Z
|
|
|
|
|
|
|
|
move-result p1
|
|
|
|
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
|
2020-07-08 16:44:49 +00:00
|
|
|
invoke-direct {p0}, Lcom/discord/widgets/servers/WidgetServerSettingsEmojisEdit;->getEditAlias()Lcom/google/android/material/textfield/TextInputLayout;
|
2020-05-17 12:40:10 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/app/AppFragment;->showKeyboard(Landroid/view/View;)V
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-void
|
|
|
|
.end method
|