2185 lines
63 KiB
Smali
2185 lines
63 KiB
Smali
.class public Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;
|
|
.super Lcom/discord/app/AppFragment;
|
|
.source "WidgetServerSettingsEditRole.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final DIALOG_TAG_COLOR_PICKER:Ljava/lang/String; = "DIALOG_TAG_COLOR_PICKER"
|
|
|
|
.field public static final INTENT_EXTRA_GUILD_ID:Ljava/lang/String; = "INTENT_EXTRA_GUILD_ID"
|
|
|
|
.field public static final INTENT_EXTRA_ROLE_ID:Ljava/lang/String; = "INTENT_EXTRA_ROLE_ID"
|
|
|
|
|
|
# instance fields
|
|
.field public changeColorDisabledOverlay:Landroid/view/View;
|
|
|
|
.field public currentColorDisplay:Landroid/view/View;
|
|
|
|
.field public editNameDisabledOverlay:Landroid/view/View;
|
|
|
|
.field public hoistCheckedSetting:Lcom/discord/views/CheckedSetting;
|
|
|
|
.field public mentionableCheckedSetting:Lcom/discord/views/CheckedSetting;
|
|
|
|
.field public permissionCheckedSettings:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Lcom/discord/views/CheckedSetting;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public pickColorButton:Landroid/view/View;
|
|
|
|
.field public roleName:Lcom/discord/app/AppEditText;
|
|
|
|
.field public saveFab:Landroid/view/View;
|
|
|
|
.field public final state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 4
|
|
|
|
invoke-direct {p0}, Lcom/discord/app/AppFragment;-><init>()V
|
|
|
|
new-instance v0, Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-array v1, v1, [I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const v3, 0x7f0a02f3
|
|
|
|
aput v3, v1, v2
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/utilities/stateful/StatefulViews;-><init>([I)V
|
|
|
|
iput-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic a(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->configureUI(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic b(Ljava/lang/Void;)V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private configureUI(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
.locals 2
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$100(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->setupMenu(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->setupActionBar(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->setupRoleName(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->setupHoistAndMentionSettings(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->setupPermissionsSettings(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->setupColorSetting(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->saveFab:Landroid/view/View;
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/utilities/stateful/StatefulViews;->configureSaveActionView(Landroid/view/View;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->saveFab:Landroid/view/View;
|
|
|
|
new-instance v1, Le/a/l/e/n1;
|
|
|
|
invoke-direct {v1, p0, p1}, Le/a/l/e/n1;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
:goto_0
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getActivity()Landroidx/fragment/app/FragmentActivity;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroid/app/Activity;->finish()V
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method private enableSetting(Lcom/discord/views/CheckedSetting;Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;I)V
|
|
.locals 1
|
|
|
|
new-instance v0, Le/a/l/e/j1;
|
|
|
|
invoke-direct {v0, p0, p2, p3}, Le/a/l/e/j1;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;I)V
|
|
|
|
invoke-virtual {p1, v0}, Lcom/discord/views/CheckedSetting;->a(Landroid/view/View$OnClickListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static getColoredSpan(Ljava/lang/String;Landroid/text/style/ForegroundColorSpan;)Landroid/text/SpannableStringBuilder;
|
|
.locals 2
|
|
|
|
new-instance v0, Landroid/text/SpannableStringBuilder;
|
|
|
|
invoke-direct {v0}, Landroid/text/SpannableStringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v0, p0}, Landroid/text/SpannableStringBuilder;->append(Ljava/lang/CharSequence;)Landroid/text/SpannableStringBuilder;
|
|
|
|
invoke-virtual {v0}, Landroid/text/SpannableStringBuilder;->length()I
|
|
|
|
move-result p0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, p1, v1, p0, v1}, Landroid/text/SpannableStringBuilder;->setSpan(Ljava/lang/Object;III)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private getColorsToDisplay(I)[I
|
|
.locals 8
|
|
.param p1 # I
|
|
.annotation build Landroidx/annotation/ColorInt;
|
|
.end annotation
|
|
.end param
|
|
.annotation build Landroidx/annotation/ColorInt;
|
|
.end annotation
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
const/high16 v1, 0x7f030000
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getIntArray(I)[I
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
array-length v2, v0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
:goto_0
|
|
if-ge v4, v2, :cond_1
|
|
|
|
aget v6, v0, v4
|
|
|
|
invoke-static {v6}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-interface {v1, v7}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
if-ne v6, p1, :cond_0
|
|
|
|
const/4 v5, 0x1
|
|
|
|
:cond_0
|
|
add-int/lit8 v4, v4, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
if-nez v5, :cond_2
|
|
|
|
invoke-static {p1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-interface {v1, p1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
:cond_2
|
|
invoke-interface {v1}, Ljava/util/List;->size()I
|
|
|
|
move-result p1
|
|
|
|
new-array p1, p1, [I
|
|
|
|
:goto_1
|
|
invoke-interface {v1}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
if-ge v3, v0, :cond_3
|
|
|
|
invoke-interface {v1, v3}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/Integer;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v0
|
|
|
|
aput v0, p1, v3
|
|
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static getDarkerColor(I)I
|
|
.locals 3
|
|
.annotation build Landroidx/annotation/ColorInt;
|
|
.end annotation
|
|
|
|
const/4 v0, 0x3
|
|
|
|
new-array v0, v0, [F
|
|
|
|
invoke-static {p0, v0}, Landroid/graphics/Color;->colorToHSV(I[F)V
|
|
|
|
const/4 p0, 0x2
|
|
|
|
aget v1, v0, p0
|
|
|
|
const/high16 v2, 0x3f000000 # 0.5f
|
|
|
|
mul-float v1, v1, v2
|
|
|
|
aput v1, v0, p0
|
|
|
|
invoke-static {v0}, Landroid/graphics/Color;->HSVToColor([F)I
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method private getLockMessage(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;Z)Ljava/lang/String;
|
|
.locals 0
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$200(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Z
|
|
|
|
move-result p2
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
const p1, 0x7f1206a3
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$400(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model$ManageStatus;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
const/4 p2, 0x1
|
|
|
|
if-eq p1, p2, :cond_3
|
|
|
|
const/4 p2, 0x2
|
|
|
|
if-eq p1, p2, :cond_2
|
|
|
|
const/4 p2, 0x3
|
|
|
|
if-eq p1, p2, :cond_1
|
|
|
|
const-string p1, ""
|
|
|
|
return-object p1
|
|
|
|
:cond_1
|
|
const p1, 0x7f12148f
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_2
|
|
const p1, 0x7f120af8
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_3
|
|
const p1, 0x7f120af7
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_4
|
|
const p1, 0x7f120af5
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public static getPermission(I)I
|
|
.locals 0
|
|
|
|
packed-switch p0, :pswitch_data_0
|
|
|
|
:pswitch_0
|
|
const/4 p0, 0x0
|
|
|
|
return p0
|
|
|
|
:pswitch_1
|
|
const/high16 p0, 0x2000000
|
|
|
|
return p0
|
|
|
|
:pswitch_2
|
|
const/high16 p0, 0x200000
|
|
|
|
return p0
|
|
|
|
:pswitch_3
|
|
const/high16 p0, 0x400000
|
|
|
|
return p0
|
|
|
|
:pswitch_4
|
|
const/high16 p0, 0x1000000
|
|
|
|
return p0
|
|
|
|
:pswitch_5
|
|
const/high16 p0, 0x800000
|
|
|
|
return p0
|
|
|
|
:pswitch_6
|
|
const/high16 p0, 0x100000
|
|
|
|
return p0
|
|
|
|
:pswitch_7
|
|
const/16 p0, 0x80
|
|
|
|
return p0
|
|
|
|
:pswitch_8
|
|
const/high16 p0, 0x40000
|
|
|
|
return p0
|
|
|
|
:pswitch_9
|
|
const/16 p0, 0x1000
|
|
|
|
return p0
|
|
|
|
:pswitch_a
|
|
const/16 p0, 0x800
|
|
|
|
return p0
|
|
|
|
:pswitch_b
|
|
const/16 p0, 0x400
|
|
|
|
return p0
|
|
|
|
:pswitch_c
|
|
const/high16 p0, 0x10000
|
|
|
|
return p0
|
|
|
|
:pswitch_d
|
|
const/high16 p0, 0x20000
|
|
|
|
return p0
|
|
|
|
:pswitch_e
|
|
const/high16 p0, 0x20000000
|
|
|
|
return p0
|
|
|
|
:pswitch_f
|
|
const/16 p0, 0x20
|
|
|
|
return p0
|
|
|
|
:pswitch_10
|
|
const/high16 p0, 0x10000000
|
|
|
|
return p0
|
|
|
|
:pswitch_11
|
|
const/high16 p0, 0x8000000
|
|
|
|
return p0
|
|
|
|
:pswitch_12
|
|
const/16 p0, 0x2000
|
|
|
|
return p0
|
|
|
|
:pswitch_13
|
|
const/high16 p0, 0x40000000 # 2.0f
|
|
|
|
return p0
|
|
|
|
:pswitch_14
|
|
const/16 p0, 0x10
|
|
|
|
return p0
|
|
|
|
:pswitch_15
|
|
const/4 p0, 0x2
|
|
|
|
return p0
|
|
|
|
:pswitch_16
|
|
const/16 p0, 0x4000
|
|
|
|
return p0
|
|
|
|
:pswitch_17
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
|
|
:pswitch_18
|
|
const/high16 p0, 0x4000000
|
|
|
|
return p0
|
|
|
|
:pswitch_19
|
|
const/4 p0, 0x4
|
|
|
|
return p0
|
|
|
|
:pswitch_1a
|
|
const p0, 0x8000
|
|
|
|
return p0
|
|
|
|
:pswitch_1b
|
|
const/16 p0, 0x8
|
|
|
|
return p0
|
|
|
|
:pswitch_1c
|
|
const/16 p0, 0x40
|
|
|
|
return p0
|
|
|
|
nop
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x7f0a06fa
|
|
:pswitch_1c
|
|
:pswitch_1b
|
|
:pswitch_1a
|
|
:pswitch_19
|
|
:pswitch_18
|
|
:pswitch_0
|
|
:pswitch_0
|
|
:pswitch_17
|
|
:pswitch_0
|
|
:pswitch_0
|
|
:pswitch_16
|
|
:pswitch_0
|
|
:pswitch_15
|
|
:pswitch_14
|
|
:pswitch_13
|
|
:pswitch_12
|
|
:pswitch_11
|
|
:pswitch_10
|
|
:pswitch_f
|
|
:pswitch_e
|
|
:pswitch_d
|
|
:pswitch_0
|
|
:pswitch_0
|
|
:pswitch_c
|
|
:pswitch_b
|
|
:pswitch_a
|
|
:pswitch_9
|
|
:pswitch_8
|
|
:pswitch_7
|
|
:pswitch_6
|
|
:pswitch_5
|
|
:pswitch_4
|
|
:pswitch_3
|
|
:pswitch_2
|
|
:pswitch_1
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method public static launch(JJLandroid/app/Activity;)V
|
|
.locals 2
|
|
|
|
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, p0, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;J)Landroid/content/Intent;
|
|
|
|
const-string p0, "INTENT_EXTRA_ROLE_ID"
|
|
|
|
invoke-virtual {v0, p0, p2, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;J)Landroid/content/Intent;
|
|
|
|
const-class p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;
|
|
|
|
invoke-static {p4, p0, v0}, Le/a/b/h;->b(Landroid/content/Context;Ljava/lang/Class;Landroid/content/Intent;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private launchColorPicker(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
.locals 4
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$100(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v0, v1}, Lcom/discord/utilities/guilds/RoleUtils;->getRoleColor(Lcom/discord/models/domain/ModelGuildRole;Landroid/content/Context;)I
|
|
|
|
move-result v0
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->getColorsToDisplay(I)[I
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getFragmentManager()Landroidx/fragment/app/FragmentManager;
|
|
|
|
move-result-object v2
|
|
|
|
new-instance v3, Le/a/l/e/i1;
|
|
|
|
invoke-direct {v3, p0, p1}, Le/a/l/e/i1;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
|
|
const-string p1, "DIALOG_TAG_COLOR_PICKER"
|
|
|
|
invoke-static {v2, v1, v0, v3, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRoleColorPicker;->show(Landroidx/fragment/app/FragmentManager;[IILcom/angarron/colorpicker/OnColorSelectedListener;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private patchRole(JLcom/discord/restapi/RestAPIParams$Role;)V
|
|
.locals 6
|
|
|
|
invoke-static {}, Lcom/discord/utilities/rest/RestAPI;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p3}, Lcom/discord/restapi/RestAPIParams$Role;->getId()J
|
|
|
|
move-result-wide v3
|
|
|
|
move-wide v1, p1
|
|
|
|
move-object v5, p3
|
|
|
|
invoke-virtual/range {v0 .. v5}, Lcom/discord/utilities/rest/RestAPI;->updateRole(JJLcom/discord/restapi/RestAPIParams$Role;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {}, Le/a/b/k;->c()Lrx/Observable$c;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p0}, Le/a/b/k;->a(Lcom/discord/app/AppComponent;)Lrx/Observable$c;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object p2, Le/a/l/e/k1;->d:Le/a/l/e/k1;
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-static {p2, p3}, Le/a/b/k;->a(Lrx/functions/Action1;Landroid/content/Context;)Lrx/Observable$c;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private setupActionBar(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
.locals 4
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/app/AppActivity;->h()Landroidx/appcompat/widget/Toolbar;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$100(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
const v2, 0x7f0601b2
|
|
|
|
invoke-static {v0, v1, v2}, Lcom/discord/utilities/guilds/RoleUtils;->getRoleColor(Lcom/discord/models/domain/ModelGuildRole;Landroid/content/Context;I)I
|
|
|
|
move-result v0
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$100(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuildRole;->isDefaultColor()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const v1, 0x7f0601b4
|
|
|
|
invoke-static {p0, v1}, Lcom/discord/utilities/color/ColorCompat;->getColor(Landroidx/fragment/app/Fragment;I)I
|
|
|
|
move-result v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-static {v0}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->getDarkerColor(I)I
|
|
|
|
move-result v1
|
|
|
|
:goto_0
|
|
invoke-static {v0}, Lcom/discord/utilities/color/ColorCompat;->isColorDark(I)Z
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Lcom/discord/app/AppActivity;->h()Landroidx/appcompat/widget/Toolbar;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3, v0}, Landroid/view/ViewGroup;->setBackgroundColor(I)V
|
|
|
|
invoke-static {p0, v1, v2}, Lcom/discord/utilities/color/ColorCompat;->setStatusBarColor(Landroidx/fragment/app/Fragment;IZ)V
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
const v0, 0x7f06014f
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const v0, 0x7f06015e
|
|
|
|
:goto_1
|
|
new-instance v1, Landroid/text/style/ForegroundColorSpan;
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v2, v0}, Lcom/discord/utilities/color/ColorCompat;->getColor(Landroid/content/Context;I)I
|
|
|
|
move-result v2
|
|
|
|
invoke-direct {v1, v2}, Landroid/text/style/ForegroundColorSpan;-><init>(I)V
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->setActionBarDisplayHomeAsUpEnabled()Landroidx/appcompat/widget/Toolbar;
|
|
|
|
const v2, 0x7f1206f8
|
|
|
|
invoke-virtual {p0, v2}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v2, v1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->getColoredSpan(Ljava/lang/String;Landroid/text/style/ForegroundColorSpan;)Landroid/text/SpannableStringBuilder;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {p0, v2}, Lcom/discord/app/AppFragment;->setActionBarTitle(Ljava/lang/CharSequence;)Lkotlin/Unit;
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$100(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildRole;->getName()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1, v1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->getColoredSpan(Ljava/lang/String;Landroid/text/style/ForegroundColorSpan;)Landroid/text/SpannableStringBuilder;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/app/AppFragment;->setActionBarSubtitle(Ljava/lang/CharSequence;)Lkotlin/Unit;
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/app/AppActivity;->h()Landroidx/appcompat/widget/Toolbar;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/app/AppActivity;->h()Landroidx/appcompat/widget/Toolbar;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Landroidx/appcompat/widget/Toolbar;->getNavigationIcon()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/app/AppActivity;->h()Landroidx/appcompat/widget/Toolbar;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Landroidx/appcompat/widget/Toolbar;->getOverflowIcon()Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v2, v0}, Landroidx/core/content/ContextCompat;->getColor(Landroid/content/Context;I)I
|
|
|
|
move-result v2
|
|
|
|
sget-object v3, Landroid/graphics/PorterDuff$Mode;->SRC_ATOP:Landroid/graphics/PorterDuff$Mode;
|
|
|
|
invoke-virtual {p1, v2, v3}, Landroid/graphics/drawable/Drawable;->setColorFilter(ILandroid/graphics/PorterDuff$Mode;)V
|
|
|
|
:cond_2
|
|
if-eqz v1, :cond_3
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1, v0}, Landroidx/core/content/ContextCompat;->getColor(Landroid/content/Context;I)I
|
|
|
|
move-result p1
|
|
|
|
sget-object v0, Landroid/graphics/PorterDuff$Mode;->SRC_ATOP:Landroid/graphics/PorterDuff$Mode;
|
|
|
|
invoke-virtual {v1, p1, v0}, Landroid/graphics/drawable/Drawable;->setColorFilter(ILandroid/graphics/PorterDuff$Mode;)V
|
|
|
|
:cond_3
|
|
return-void
|
|
.end method
|
|
|
|
.method private setupColorSetting(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->currentColorDisplay:Landroid/view/View;
|
|
|
|
invoke-virtual {v0}, Landroid/view/View;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
const v1, 0x7f080132
|
|
|
|
invoke-static {v0, v1}, Landroidx/core/content/ContextCompat;->getDrawable(Landroid/content/Context;I)Landroid/graphics/drawable/Drawable;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$100(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->requireContext()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v1, v2}, Lcom/discord/utilities/guilds/RoleUtils;->getRoleColor(Lcom/discord/models/domain/ModelGuildRole;Landroid/content/Context;)I
|
|
|
|
move-result v1
|
|
|
|
sget-object v2, Landroid/graphics/PorterDuff$Mode;->SRC_IN:Landroid/graphics/PorterDuff$Mode;
|
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/graphics/drawable/Drawable;->setColorFilter(ILandroid/graphics/PorterDuff$Mode;)V
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->currentColorDisplay:Landroid/view/View;
|
|
|
|
invoke-virtual {v1, v0}, Landroid/view/View;->setBackground(Landroid/graphics/drawable/Drawable;)V
|
|
|
|
:cond_0
|
|
invoke-virtual {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->canManage()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$200(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->pickColorButton:Landroid/view/View;
|
|
|
|
new-instance v1, Le/a/l/e/a1;
|
|
|
|
invoke-direct {v1, p0, p1}, Le/a/l/e/a1;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->changeColorDisabledOverlay:Landroid/view/View;
|
|
|
|
const/16 v0, 0x8
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->changeColorDisabledOverlay:Landroid/view/View;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->changeColorDisabledOverlay:Landroid/view/View;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->changeColorDisabledOverlay:Landroid/view/View;
|
|
|
|
new-instance v1, Le/a/l/e/h1;
|
|
|
|
invoke-direct {v1, p0, p1}, Le/a/l/e/h1;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private setupHoistAndMentionSettings(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->hoistCheckedSetting:Lcom/discord/views/CheckedSetting;
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$100(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuildRole;->isHoist()Z
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/views/CheckedSetting;->setChecked(Z)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->mentionableCheckedSetting:Lcom/discord/views/CheckedSetting;
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$100(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelGuildRole;->isMentionable()Z
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/views/CheckedSetting;->setChecked(Z)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->canManage()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$200(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->hoistCheckedSetting:Lcom/discord/views/CheckedSetting;
|
|
|
|
new-instance v1, Le/a/l/e/c1;
|
|
|
|
invoke-direct {v1, p0, p1}, Le/a/l/e/c1;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/views/CheckedSetting;->a(Landroid/view/View$OnClickListener;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->mentionableCheckedSetting:Lcom/discord/views/CheckedSetting;
|
|
|
|
new-instance v1, Le/a/l/e/m1;
|
|
|
|
invoke-direct {v1, p0, p1}, Le/a/l/e/m1;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/views/CheckedSetting;->a(Landroid/view/View$OnClickListener;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x1
|
|
|
|
invoke-direct {p0, p1, v0}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->getLockMessage(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;Z)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->hoistCheckedSetting:Lcom/discord/views/CheckedSetting;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/views/CheckedSetting;->b(Ljava/lang/String;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->mentionableCheckedSetting:Lcom/discord/views/CheckedSetting;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/views/CheckedSetting;->b(Ljava/lang/String;)V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private setupMenu(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
.locals 2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->canManage()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$200(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$100(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuildRole;->isManaged()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const v0, 0x7f0e000a
|
|
|
|
new-instance v1, Le/a/l/e/l1;
|
|
|
|
invoke-direct {v1, p0, p1}, Le/a/l/e/l1;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
|
|
invoke-virtual {p0, v0, v1}, Lcom/discord/app/AppFragment;->setActionBarOptionsMenu(ILrx/functions/Action2;)Landroidx/appcompat/widget/Toolbar;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const p1, 0x7f0e000b
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p0, p1, v0}, Lcom/discord/app/AppFragment;->setActionBarOptionsMenu(ILrx/functions/Action2;)Landroidx/appcompat/widget/Toolbar;
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private setupPermissionsSettings(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
.locals 8
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->permissionCheckedSettings:Ljava/util/List;
|
|
|
|
invoke-interface {v0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_0
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/discord/views/CheckedSetting;
|
|
|
|
invoke-virtual {v1}, Landroid/widget/RelativeLayout;->getId()I
|
|
|
|
move-result v2
|
|
|
|
invoke-static {v2}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->getPermission(I)I
|
|
|
|
move-result v2
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$100(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelGuildRole;->getPermissions()I
|
|
|
|
move-result v3
|
|
|
|
invoke-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v2, v3}, Lcom/discord/utilities/permissions/PermissionUtils;->can(ILjava/lang/Integer;)Z
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {v1, v3}, Lcom/discord/views/CheckedSetting;->setChecked(Z)V
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$300(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)I
|
|
|
|
move-result v4
|
|
|
|
invoke-static {v4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-static {v2, v4}, Lcom/discord/utilities/permissions/PermissionUtils;->can(ILjava/lang/Integer;)Z
|
|
|
|
move-result v4
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$400(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model$ManageStatus;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v5
|
|
|
|
const/4 v6, 0x4
|
|
|
|
const v7, 0x7f120af9
|
|
|
|
if-eq v5, v6, :cond_2
|
|
|
|
const/4 v3, 0x5
|
|
|
|
if-eq v5, v3, :cond_0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-direct {p0, p1, v2}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->getLockMessage(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;Z)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Lcom/discord/views/CheckedSetting;->b(Ljava/lang/String;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->isOwner()Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_1
|
|
|
|
const/16 v3, 0x8
|
|
|
|
if-ne v2, v3, :cond_1
|
|
|
|
invoke-virtual {p1, v2}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->isSingular(I)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
invoke-virtual {v1, v7}, Lcom/discord/views/CheckedSetting;->a(I)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
invoke-direct {p0, v1, p1, v2}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->enableSetting(Lcom/discord/views/CheckedSetting;Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;I)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
if-eqz v4, :cond_4
|
|
|
|
invoke-virtual {p1, v2}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->isSingular(I)Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_3
|
|
|
|
if-nez v3, :cond_4
|
|
|
|
:cond_3
|
|
invoke-direct {p0, v1, p1, v2}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->enableSetting(Lcom/discord/views/CheckedSetting;Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;I)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_4
|
|
if-nez v4, :cond_5
|
|
|
|
const v2, 0x7f120af6
|
|
|
|
invoke-virtual {v1, v2}, Lcom/discord/views/CheckedSetting;->a(I)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_5
|
|
invoke-virtual {v1, v7}, Lcom/discord/views/CheckedSetting;->a(I)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_6
|
|
return-void
|
|
.end method
|
|
|
|
.method private setupRoleName(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
.locals 4
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->roleName:Lcom/discord/app/AppEditText;
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
invoke-virtual {v0}, Landroid/widget/EditText;->getId()I
|
|
|
|
move-result v2
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$100(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelGuildRole;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v1, v2, v3}, Lcom/discord/utilities/stateful/StatefulViews;->get(ILjava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljava/lang/CharSequence;
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/EditText;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
invoke-virtual {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->canManage()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$200(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->editNameDisabledOverlay:Landroid/view/View;
|
|
|
|
const/16 v0, 0x8
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->editNameDisabledOverlay:Landroid/view/View;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->editNameDisabledOverlay:Landroid/view/View;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->editNameDisabledOverlay:Landroid/view/View;
|
|
|
|
new-instance v1, Le/a/l/e/b1;
|
|
|
|
invoke-direct {v1, p0, p1}, Le/a/l/e/b1;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public synthetic a(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;I)V
|
|
.locals 4
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$100(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lcom/discord/restapi/RestAPIParams$Role;->createWithRole(Lcom/discord/models/domain/ModelGuildRole;)Lcom/discord/restapi/RestAPIParams$Role;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p2}, Landroid/graphics/Color;->red(I)I
|
|
|
|
move-result v1
|
|
|
|
invoke-static {p2}, Landroid/graphics/Color;->green(I)I
|
|
|
|
move-result v2
|
|
|
|
invoke-static {p2}, Landroid/graphics/Color;->blue(I)I
|
|
|
|
move-result p2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-static {v3, v1, v2, p2}, Landroid/graphics/Color;->argb(IIII)I
|
|
|
|
move-result p2
|
|
|
|
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {v0, p2}, Lcom/discord/restapi/RestAPIParams$Role;->setColor(Ljava/lang/Integer;)V
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$500(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)J
|
|
|
|
move-result-wide p1
|
|
|
|
invoke-direct {p0, p1, p2, v0}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->patchRole(JLcom/discord/restapi/RestAPIParams$Role;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic a(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;ILandroid/view/View;)V
|
|
.locals 1
|
|
|
|
iget-object p3, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->roleName:Lcom/discord/app/AppEditText;
|
|
|
|
invoke-virtual {p3}, Landroid/widget/EditText;->clearFocus()V
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$100(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-static {p3}, Lcom/discord/restapi/RestAPIParams$Role;->createWithRole(Lcom/discord/models/domain/ModelGuildRole;)Lcom/discord/restapi/RestAPIParams$Role;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$100(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelGuildRole;->getPermissions()I
|
|
|
|
move-result v0
|
|
|
|
xor-int/2addr p2, v0
|
|
|
|
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p3, p2}, Lcom/discord/restapi/RestAPIParams$Role;->setPermissions(Ljava/lang/Integer;)V
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$500(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)J
|
|
|
|
move-result-wide p1
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->patchRole(JLcom/discord/restapi/RestAPIParams$Role;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic a(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;Landroid/view/MenuItem;Landroid/content/Context;)V
|
|
.locals 4
|
|
|
|
invoke-interface {p2}, Landroid/view/MenuItem;->getItemId()I
|
|
|
|
move-result p2
|
|
|
|
const p3, 0x7f0a052d
|
|
|
|
if-eq p2, p3, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-static {}, Lcom/discord/utilities/rest/RestAPI;->getApi()Lcom/discord/utilities/rest/RestAPI;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$500(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$100(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelGuildRole;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-virtual {p2, v0, v1, v2, v3}, Lcom/discord/utilities/rest/RestAPI;->deleteRole(JJ)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {}, Le/a/b/k;->c()Lrx/Observable$c;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p0}, Le/a/b/k;->a(Lcom/discord/app/AppComponent;)Lrx/Observable$c;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance p2, Le/a/l/e/z0;
|
|
|
|
invoke-direct {p2, p0}, Le/a/l/e/z0;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;)V
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-static {p2, p3}, Le/a/b/k;->a(Lrx/functions/Action1;Landroid/content/Context;)Lrx/Observable$c;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic a(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;Landroid/view/View;)V
|
|
.locals 2
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->roleName:Lcom/discord/app/AppEditText;
|
|
|
|
invoke-virtual {p2}, Lcom/discord/app/AppEditText;->getTrimmedText()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->roleName:Lcom/discord/app/AppEditText;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/EditText;->setSelected(Z)V
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$100(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lcom/discord/restapi/RestAPIParams$Role;->createWithRole(Lcom/discord/models/domain/ModelGuildRole;)Lcom/discord/restapi/RestAPIParams$Role;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p2}, Lcom/discord/restapi/RestAPIParams$Role;->setName(Ljava/lang/String;)V
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$500(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)J
|
|
|
|
move-result-wide p1
|
|
|
|
invoke-direct {p0, p1, p2, v0}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->patchRole(JLcom/discord/restapi/RestAPIParams$Role;)V
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->hideKeyboard()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const p1, 0x7f1206f6
|
|
|
|
invoke-static {p0, p1}, Le/a/b/j;->a(Landroidx/fragment/app/Fragment;I)V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic a(Ljava/lang/Void;)V
|
|
.locals 0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Le/a/b/d;->onBackPressed()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic b(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;Landroid/view/View;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->launchColorPicker(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic c(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;Landroid/view/View;)V
|
|
.locals 0
|
|
|
|
const/4 p2, 0x1
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->getLockMessage(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;Z)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p0, p1}, Le/a/b/j;->a(Landroidx/fragment/app/Fragment;Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic d(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;Landroid/view/View;)V
|
|
.locals 2
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->roleName:Lcom/discord/app/AppEditText;
|
|
|
|
invoke-virtual {p2}, Landroid/widget/EditText;->clearFocus()V
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$100(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p2}, Lcom/discord/restapi/RestAPIParams$Role;->createWithRole(Lcom/discord/models/domain/ModelGuildRole;)Lcom/discord/restapi/RestAPIParams$Role;
|
|
|
|
move-result-object p2
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->hoistCheckedSetting:Lcom/discord/views/CheckedSetting;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/views/CheckedSetting;->isChecked()Z
|
|
|
|
move-result v0
|
|
|
|
xor-int/lit8 v0, v0, 0x1
|
|
|
|
invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p2, v0}, Lcom/discord/restapi/RestAPIParams$Role;->setHoist(Ljava/lang/Boolean;)V
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$500(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-direct {p0, v0, v1, p2}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->patchRole(JLcom/discord/restapi/RestAPIParams$Role;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic e(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;Landroid/view/View;)V
|
|
.locals 2
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->roleName:Lcom/discord/app/AppEditText;
|
|
|
|
invoke-virtual {p2}, Landroid/widget/EditText;->clearFocus()V
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$100(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)Lcom/discord/models/domain/ModelGuildRole;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-static {p2}, Lcom/discord/restapi/RestAPIParams$Role;->createWithRole(Lcom/discord/models/domain/ModelGuildRole;)Lcom/discord/restapi/RestAPIParams$Role;
|
|
|
|
move-result-object p2
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->mentionableCheckedSetting:Lcom/discord/views/CheckedSetting;
|
|
|
|
invoke-virtual {v0}, Lcom/discord/views/CheckedSetting;->isChecked()Z
|
|
|
|
move-result v0
|
|
|
|
xor-int/lit8 v0, v0, 0x1
|
|
|
|
invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p2, v0}, Lcom/discord/restapi/RestAPIParams$Role;->setMentionable(Ljava/lang/Boolean;)V
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$500(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-direct {p0, v0, v1, p2}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->patchRole(JLcom/discord/restapi/RestAPIParams$Role;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic f(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;Landroid/view/View;)V
|
|
.locals 0
|
|
|
|
const/4 p2, 0x1
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->getLockMessage(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;Z)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p0, p1}, Le/a/b/j;->a(Landroidx/fragment/app/Fragment;Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public getContentViewResId()I
|
|
.locals 1
|
|
|
|
const v0, 0x7f0d0198
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public onViewBound(Landroid/view/View;)V
|
|
.locals 6
|
|
.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
|
|
|
|
const/4 v0, 0x1
|
|
|
|
invoke-virtual {p0, v0}, Landroidx/fragment/app/Fragment;->setRetainInstance(Z)V
|
|
|
|
const v1, 0x7f0a0703
|
|
|
|
invoke-virtual {p1, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->editNameDisabledOverlay:Landroid/view/View;
|
|
|
|
const v1, 0x7f0a06ff
|
|
|
|
invoke-virtual {p1, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->changeColorDisabledOverlay:Landroid/view/View;
|
|
|
|
const v1, 0x7f0a02f3
|
|
|
|
invoke-virtual {p1, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/discord/app/AppEditText;
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->roleName:Lcom/discord/app/AppEditText;
|
|
|
|
const v1, 0x7f0a0700
|
|
|
|
invoke-virtual {p1, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->pickColorButton:Landroid/view/View;
|
|
|
|
const v1, 0x7f0a0702
|
|
|
|
invoke-virtual {p1, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->currentColorDisplay:Landroid/view/View;
|
|
|
|
const v1, 0x7f0a02f4
|
|
|
|
invoke-virtual {p1, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->saveFab:Landroid/view/View;
|
|
|
|
const v1, 0x7f0a0705
|
|
|
|
invoke-virtual {p1, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/discord/views/CheckedSetting;
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->hoistCheckedSetting:Lcom/discord/views/CheckedSetting;
|
|
|
|
const v1, 0x7f0a070f
|
|
|
|
invoke-virtual {p1, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/discord/views/CheckedSetting;
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->mentionableCheckedSetting:Lcom/discord/views/CheckedSetting;
|
|
|
|
const/16 v1, 0x1c
|
|
|
|
new-array v1, v1, [Lcom/discord/views/CheckedSetting;
|
|
|
|
const v2, 0x7f0a06fb
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
aput-object v2, v1, v3
|
|
|
|
const v2, 0x7f0a06fc
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
aput-object v2, v1, v0
|
|
|
|
const v2, 0x7f0a06fd
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/4 v4, 0x2
|
|
|
|
aput-object v2, v1, v4
|
|
|
|
const v2, 0x7f0a06fe
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/4 v4, 0x3
|
|
|
|
aput-object v2, v1, v4
|
|
|
|
const v2, 0x7f0a0701
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/4 v4, 0x4
|
|
|
|
aput-object v2, v1, v4
|
|
|
|
const v2, 0x7f0a0704
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/4 v4, 0x5
|
|
|
|
aput-object v2, v1, v4
|
|
|
|
const v2, 0x7f0a0706
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/4 v4, 0x6
|
|
|
|
aput-object v2, v1, v4
|
|
|
|
const v2, 0x7f0a0707
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/4 v4, 0x7
|
|
|
|
aput-object v2, v1, v4
|
|
|
|
const v2, 0x7f0a0709
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/16 v4, 0x8
|
|
|
|
aput-object v2, v1, v4
|
|
|
|
const v2, 0x7f0a070a
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/16 v5, 0x9
|
|
|
|
aput-object v2, v1, v5
|
|
|
|
const v2, 0x7f0a0708
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/16 v5, 0xa
|
|
|
|
aput-object v2, v1, v5
|
|
|
|
const v2, 0x7f0a070b
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/16 v5, 0xb
|
|
|
|
aput-object v2, v1, v5
|
|
|
|
const v2, 0x7f0a070c
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/16 v5, 0xc
|
|
|
|
aput-object v2, v1, v5
|
|
|
|
const v2, 0x7f0a070d
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/16 v5, 0xd
|
|
|
|
aput-object v2, v1, v5
|
|
|
|
const v2, 0x7f0a070e
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/16 v5, 0xe
|
|
|
|
aput-object v2, v1, v5
|
|
|
|
const v2, 0x7f0a0711
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/16 v5, 0xf
|
|
|
|
aput-object v2, v1, v5
|
|
|
|
const v2, 0x7f0a0712
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/16 v5, 0x10
|
|
|
|
aput-object v2, v1, v5
|
|
|
|
const v2, 0x7f0a0713
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/16 v5, 0x11
|
|
|
|
aput-object v2, v1, v5
|
|
|
|
const v2, 0x7f0a0714
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/16 v5, 0x12
|
|
|
|
aput-object v2, v1, v5
|
|
|
|
const v2, 0x7f0a0715
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/16 v5, 0x13
|
|
|
|
aput-object v2, v1, v5
|
|
|
|
const v2, 0x7f0a06fa
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/16 v5, 0x14
|
|
|
|
aput-object v2, v1, v5
|
|
|
|
const v2, 0x7f0a0716
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/16 v5, 0x15
|
|
|
|
aput-object v2, v1, v5
|
|
|
|
const v2, 0x7f0a0717
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/16 v5, 0x16
|
|
|
|
aput-object v2, v1, v5
|
|
|
|
const v2, 0x7f0a071b
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/16 v5, 0x17
|
|
|
|
aput-object v2, v1, v5
|
|
|
|
const v2, 0x7f0a071a
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/16 v5, 0x18
|
|
|
|
aput-object v2, v1, v5
|
|
|
|
const v2, 0x7f0a0718
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/16 v5, 0x19
|
|
|
|
aput-object v2, v1, v5
|
|
|
|
const v2, 0x7f0a0719
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/16 v5, 0x1a
|
|
|
|
aput-object v2, v1, v5
|
|
|
|
const v2, 0x7f0a071c
|
|
|
|
invoke-virtual {p1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Lcom/discord/views/CheckedSetting;
|
|
|
|
const/16 v2, 0x1b
|
|
|
|
aput-object p1, v1, v2
|
|
|
|
invoke-static {v1}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->permissionCheckedSettings:Ljava/util/List;
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->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/WidgetServerSettingsEditRole;->state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->saveFab:Landroid/view/View;
|
|
|
|
new-array v0, v0, [Landroid/widget/TextView;
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->roleName:Lcom/discord/app/AppEditText;
|
|
|
|
aput-object v2, v0, v3
|
|
|
|
invoke-virtual {p1, p0, v1, v0}, Lcom/discord/utilities/stateful/StatefulViews;->setupTextWatcherWithSaveAction(Lcom/discord/app/AppFragment;Landroid/view/View;[Landroid/widget/TextView;)V
|
|
|
|
iget-object p1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->saveFab:Landroid/view/View;
|
|
|
|
invoke-virtual {p1, v4}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onViewBoundOrOnResume()V
|
|
.locals 6
|
|
|
|
invoke-super {p0}, Lcom/discord/app/AppFragment;->onViewBoundOrOnResume()V
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getMostRecentIntent()Landroid/content/Intent;
|
|
|
|
move-result-object v0
|
|
|
|
const-wide/16 v1, -0x1
|
|
|
|
const-string v3, "INTENT_EXTRA_GUILD_ID"
|
|
|
|
invoke-virtual {v0, v3, v1, v2}, Landroid/content/Intent;->getLongExtra(Ljava/lang/String;J)J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getMostRecentIntent()Landroid/content/Intent;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v5, "INTENT_EXTRA_ROLE_ID"
|
|
|
|
invoke-virtual {v0, v5, v1, v2}, Landroid/content/Intent;->getLongExtra(Ljava/lang/String;J)J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-static {v3, v4, v0, v1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$000(JJ)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p0}, Le/a/b/k;->a(Lcom/discord/app/AppComponent;)Lrx/Observable$c;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Le/a/l/e/d1;
|
|
|
|
invoke-direct {v1, p0}, Le/a/l/e/d1;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;)V
|
|
|
|
const-class v2, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;
|
|
|
|
invoke-static {v1, v2}, Le/a/b/k;->a(Lrx/functions/Action1;Ljava/lang/Class;)Lrx/Observable$c;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->a(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getFragmentManager()Landroidx/fragment/app/FragmentManager;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const-string v1, "DIALOG_TAG_COLOR_PICKER"
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/fragment/app/FragmentManager;->findFragmentByTag(Ljava/lang/String;)Landroidx/fragment/app/Fragment;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-virtual {v0}, Landroidx/fragment/app/FragmentManager;->beginTransaction()Landroidx/fragment/app/FragmentTransaction;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v1}, Landroidx/fragment/app/FragmentTransaction;->remove(Landroidx/fragment/app/Fragment;)Landroidx/fragment/app/FragmentTransaction;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroidx/fragment/app/FragmentTransaction;->commit()I
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|