2292 lines
66 KiB
Smali
2292 lines
66 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/google/android/material/textfield/TextInputLayout;
|
|
|
|
.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, 0x7f0a0318
|
|
|
|
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 access$600(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;JLcom/discord/restapi/RestAPIParams$Role;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->patchRole(JLcom/discord/restapi/RestAPIParams$Role;)V
|
|
|
|
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, Lf/a/o/e/l1;
|
|
|
|
invoke-direct {v1, p0, p1}, Lf/a/o/e/l1;-><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;J)V
|
|
.locals 1
|
|
|
|
new-instance v0, Lf/a/o/e/h1;
|
|
|
|
invoke-direct {v0, p0, p2, p3, p4}, Lf/a/o/e/h1;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;J)V
|
|
|
|
invoke-virtual {p1, v0}, Lcom/discord/views/CheckedSetting;->e(Landroid/view/View$OnClickListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static synthetic f(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 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 v1, 0x7f030004
|
|
|
|
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-virtual {v1, v7}, Ljava/util/ArrayList;->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-virtual {v1, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
:cond_2
|
|
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result p1
|
|
|
|
new-array p1, p1, [I
|
|
|
|
:goto_1
|
|
invoke-virtual {v1}, Ljava/util/ArrayList;->size()I
|
|
|
|
move-result v0
|
|
|
|
if-ge v3, v0, :cond_3
|
|
|
|
invoke-virtual {v1, v3}, Ljava/util/ArrayList;->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, 0x7f120716
|
|
|
|
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, 0x7f121608
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_2
|
|
const p1, 0x7f120bbd
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_3
|
|
const p1, 0x7f120bbc
|
|
|
|
invoke-virtual {p0, p1}, Landroidx/fragment/app/Fragment;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
:cond_4
|
|
const p1, 0x7f120bba
|
|
|
|
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)J
|
|
.locals 2
|
|
|
|
packed-switch p0, :pswitch_data_0
|
|
|
|
:pswitch_0
|
|
const-wide/16 v0, 0x0
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_1
|
|
const-wide/32 v0, 0x2000000
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_2
|
|
const-wide/32 v0, 0x200000
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_3
|
|
const-wide/32 v0, 0x400000
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_4
|
|
const-wide/32 v0, 0x1000000
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_5
|
|
const-wide/32 v0, 0x800000
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_6
|
|
const-wide/32 v0, 0x100000
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_7
|
|
const-wide/16 v0, 0x80
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_8
|
|
const-wide/32 v0, 0x40000
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_9
|
|
const-wide/16 v0, 0x1000
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_a
|
|
const-wide/16 v0, 0x800
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_b
|
|
const-wide/16 v0, 0x400
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_c
|
|
const-wide/32 v0, 0x10000
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_d
|
|
const-wide/32 v0, 0x20000
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_e
|
|
const-wide/32 v0, 0x20000000
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_f
|
|
const-wide/16 v0, 0x20
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_10
|
|
const-wide/32 v0, 0x10000000
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_11
|
|
const-wide/32 v0, 0x8000000
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_12
|
|
const-wide/16 v0, 0x2000
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_13
|
|
const-wide/32 v0, 0x40000000
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_14
|
|
const-wide/16 v0, 0x10
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_15
|
|
const-wide/16 v0, 0x2
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_16
|
|
const-wide/16 v0, 0x4000
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_17
|
|
const-wide/16 v0, 0x1
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_18
|
|
const-wide/32 v0, 0x4000000
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_19
|
|
const-wide/16 v0, 0x4
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_1a
|
|
const-wide/32 v0, 0x8000
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_1b
|
|
const-wide/16 v0, 0x8
|
|
|
|
return-wide v0
|
|
|
|
:pswitch_1c
|
|
const-wide/16 v0, 0x40
|
|
|
|
return-wide v0
|
|
|
|
nop
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x7f0a0759
|
|
: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 synthetic j(Ljava/lang/Void;)V
|
|
.locals 0
|
|
|
|
return-void
|
|
.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}, Lf/a/b/k;->e(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-static {}, Lf/i/a/a/e;->j()Lf/i/a/a/e$k;
|
|
|
|
move-result-object v1
|
|
|
|
iput v0, v1, Lf/i/a/a/e$k;->h:I
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
const v3, 0x7f040129
|
|
|
|
invoke-static {v2, v3}, Lcom/discord/utilities/color/ColorCompat;->getThemedColor(Landroid/content/Context;I)I
|
|
|
|
move-result v2
|
|
|
|
iput v2, v1, Lf/i/a/a/e$k;->t:I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
iput-boolean v2, v1, Lf/i/a/a/e$k;->j:Z
|
|
|
|
invoke-direct {p0, v0}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->getColorsToDisplay(I)[I
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, v1, Lf/i/a/a/e$k;->g:[I
|
|
|
|
const v0, 0x7f121341
|
|
|
|
iput v0, v1, Lf/i/a/a/e$k;->a:I
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
const v2, 0x7f040142
|
|
|
|
invoke-static {v0, v2}, Lcom/discord/utilities/color/ColorCompat;->getThemedColor(Landroid/content/Context;I)I
|
|
|
|
move-result v0
|
|
|
|
iput v0, v1, Lf/i/a/a/e$k;->s:I
|
|
|
|
const v0, 0x7f090001
|
|
|
|
iput v0, v1, Lf/i/a/a/e$k;->y:I
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
const v2, 0x7f04011b
|
|
|
|
invoke-static {v0, v2}, Lcom/discord/utilities/color/ColorCompat;->getThemedColor(Landroid/content/Context;I)I
|
|
|
|
move-result v0
|
|
|
|
iput v0, v1, Lf/i/a/a/e$k;->p:I
|
|
|
|
const v0, 0x7f12044b
|
|
|
|
iput v0, v1, Lf/i/a/a/e$k;->c:I
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
const v2, 0x7f060291
|
|
|
|
invoke-static {v0, v2}, Lcom/discord/utilities/color/ColorCompat;->getColor(Landroid/content/Context;I)I
|
|
|
|
move-result v0
|
|
|
|
iput v0, v1, Lf/i/a/a/e$k;->w:I
|
|
|
|
const v0, 0x7f12044c
|
|
|
|
iput v0, v1, Lf/i/a/a/e$k;->b:I
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
const v3, 0x7f060045
|
|
|
|
invoke-static {v0, v3}, Lcom/discord/utilities/color/ColorCompat;->getColor(Landroid/content/Context;I)I
|
|
|
|
move-result v0
|
|
|
|
iput v0, v1, Lf/i/a/a/e$k;->q:I
|
|
|
|
const v0, 0x7f12140a
|
|
|
|
iput v0, v1, Lf/i/a/a/e$k;->d:I
|
|
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, v1, Lf/i/a/a/e$k;->m:Z
|
|
|
|
const v0, 0x7f121331
|
|
|
|
iput v0, v1, Lf/i/a/a/e$k;->e:I
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0, v2}, Lcom/discord/utilities/color/ColorCompat;->getColor(Landroid/content/Context;I)I
|
|
|
|
move-result v0
|
|
|
|
iput v0, v1, Lf/i/a/a/e$k;->x:I
|
|
|
|
const v0, 0x7f090003
|
|
|
|
iput v0, v1, Lf/i/a/a/e$k;->z:I
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
const v2, 0x7f040125
|
|
|
|
invoke-static {v0, v2}, Lcom/discord/utilities/color/ColorCompat;->getThemedColor(Landroid/content/Context;I)I
|
|
|
|
move-result v0
|
|
|
|
iput v0, v1, Lf/i/a/a/e$k;->r:I
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
const v2, 0x7f040166
|
|
|
|
invoke-static {v0, v2}, Lcom/discord/utilities/color/ColorCompat;->getThemedColor(Landroid/content/Context;I)I
|
|
|
|
move-result v0
|
|
|
|
iput v0, v1, Lf/i/a/a/e$k;->u:I
|
|
|
|
const v0, 0x7f080144
|
|
|
|
iput v0, v1, Lf/i/a/a/e$k;->v:I
|
|
|
|
const v0, 0x7f090002
|
|
|
|
iput v0, v1, Lf/i/a/a/e$k;->A:I
|
|
|
|
invoke-virtual {v1}, Lf/i/a/a/e$k;->a()Lf/i/a/a/e;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$1;
|
|
|
|
invoke-direct {v1, p0, p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$1;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
|
|
iput-object v1, v0, Lf/i/a/a/e;->d:Lf/i/a/a/g;
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->hideKeyboard()V
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getParentFragmentManager()Landroidx/fragment/app/FragmentManager;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v1, "DIALOG_TAG_COLOR_PICKER"
|
|
|
|
invoke-virtual {v0, p1, v1}, Landroidx/fragment/app/DialogFragment;->show(Landroidx/fragment/app/FragmentManager;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 {}, Lf/a/b/q;->e()Lrx/Observable$c;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p0}, Lf/a/b/q;->r(Lcom/discord/app/AppComponent;)Lrx/Observable$c;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object p2, Lf/a/o/e/i1;->d:Lf/a/o/e/i1;
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-static {p2, p3}, Lf/a/b/q;->l(Lrx/functions/Action1;Landroid/content/Context;)Lrx/Observable$c;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->k(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
|
|
|
|
iget-object v0, v0, Lcom/discord/app/AppActivity;->l:Landroidx/appcompat/widget/Toolbar;
|
|
|
|
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, 0x7f0601d8
|
|
|
|
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, 0x7f0601da
|
|
|
|
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
|
|
|
|
iget-object v3, v3, Lcom/discord/app/AppActivity;->l:Landroidx/appcompat/widget/Toolbar;
|
|
|
|
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, 0x7f060172
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const v0, 0x7f060181
|
|
|
|
: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, 0x7f12076a
|
|
|
|
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
|
|
|
|
iget-object p1, p1, Lcom/discord/app/AppActivity;->l:Landroidx/appcompat/widget/Toolbar;
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getAppActivity()Lcom/discord/app/AppActivity;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object p1, p1, Lcom/discord/app/AppActivity;->l:Landroidx/appcompat/widget/Toolbar;
|
|
|
|
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
|
|
|
|
iget-object v1, v1, Lcom/discord/app/AppActivity;->l:Landroidx/appcompat/widget/Toolbar;
|
|
|
|
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}, Lcom/discord/utilities/color/ColorCompat;->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}, Lcom/discord/utilities/color/ColorCompat;->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, 0x7f08013f
|
|
|
|
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, Lf/a/o/e/y0;
|
|
|
|
invoke-direct {v1, p0, p1}, Lf/a/o/e/y0;-><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, Lf/a/o/e/g1;
|
|
|
|
invoke-direct {v1, p0, p1}, Lf/a/o/e/g1;-><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, Lf/a/o/e/a1;
|
|
|
|
invoke-direct {v1, p0, p1}, Lf/a/o/e/a1;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/views/CheckedSetting;->e(Landroid/view/View$OnClickListener;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->mentionableCheckedSetting:Lcom/discord/views/CheckedSetting;
|
|
|
|
new-instance v1, Lf/a/o/e/k1;
|
|
|
|
invoke-direct {v1, p0, p1}, Lf/a/o/e/k1;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/views/CheckedSetting;->e(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;->c(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;->c(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, 0x7f0e000b
|
|
|
|
new-instance v1, Lf/a/o/e/j1;
|
|
|
|
invoke-direct {v1, p0, p1}, Lf/a/o/e/j1;-><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, 0x7f0e000c
|
|
|
|
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 9
|
|
|
|
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)J
|
|
|
|
move-result-wide 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 v4
|
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelGuildRole;->getPermissions()J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-static {v4, v5}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-static {v2, v3, v4}, Lcom/discord/utilities/permissions/PermissionUtils;->can(JLjava/lang/Long;)Z
|
|
|
|
move-result v4
|
|
|
|
invoke-virtual {v1, v4}, Lcom/discord/views/CheckedSetting;->setChecked(Z)V
|
|
|
|
invoke-static {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$300(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;)J
|
|
|
|
move-result-wide v5
|
|
|
|
invoke-static {v5, v6}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-static {v2, v3, v5}, Lcom/discord/utilities/permissions/PermissionUtils;->can(JLjava/lang/Long;)Z
|
|
|
|
move-result v5
|
|
|
|
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 v6
|
|
|
|
invoke-virtual {v6}, Ljava/lang/Enum;->ordinal()I
|
|
|
|
move-result v6
|
|
|
|
const/4 v7, 0x4
|
|
|
|
const v8, 0x7f120bbf
|
|
|
|
if-eq v6, v7, :cond_2
|
|
|
|
const/4 v4, 0x5
|
|
|
|
if-eq v6, v4, :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;->c(Ljava/lang/String;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {p1}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->isOwner()Z
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_1
|
|
|
|
const-wide/16 v4, 0x8
|
|
|
|
cmp-long v6, v2, v4
|
|
|
|
if-nez v6, :cond_1
|
|
|
|
invoke-virtual {p1, v2, v3}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->isSingular(J)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
invoke-virtual {v1, v8}, Lcom/discord/views/CheckedSetting;->b(I)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
invoke-direct {p0, v1, p1, v2, v3}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->enableSetting(Lcom/discord/views/CheckedSetting;Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;J)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
if-eqz v5, :cond_4
|
|
|
|
invoke-virtual {p1, v2, v3}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->isSingular(J)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_3
|
|
|
|
if-nez v4, :cond_4
|
|
|
|
:cond_3
|
|
invoke-direct {p0, v1, p1, v2, v3}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->enableSetting(Lcom/discord/views/CheckedSetting;Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;J)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_4
|
|
if-nez v5, :cond_5
|
|
|
|
const v2, 0x7f120bbb
|
|
|
|
invoke-virtual {v1, v2}, Lcom/discord/views/CheckedSetting;->b(I)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_5
|
|
invoke-virtual {v1, v8}, Lcom/discord/views/CheckedSetting;->b(I)V
|
|
|
|
goto/16 :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/google/android/material/textfield/TextInputLayout;
|
|
|
|
iget-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->state:Lcom/discord/utilities/stateful/StatefulViews;
|
|
|
|
invoke-virtual {v0}, Landroid/widget/LinearLayout;->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-static {v0, v1}, Lcom/discord/utilities/view/extensions/ViewExtensions;->setText(Lcom/google/android/material/textfield/TextInputLayout;Ljava/lang/CharSequence;)Lkotlin/Unit;
|
|
|
|
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, Lf/a/o/e/z0;
|
|
|
|
invoke-direct {v1, p0, p1}, Lf/a/o/e/z0;-><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 g(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;Landroid/view/View;)V
|
|
.locals 2
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->roleName:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
invoke-static {p2}, Lcom/discord/utilities/view/extensions/ViewExtensions;->getTextOrEmpty(Lcom/google/android/material/textfield/TextInputLayout;)Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p2}, Ljava/lang/String;->trim()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/google/android/material/textfield/TextInputLayout;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/LinearLayout;->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, 0x7f120768
|
|
|
|
invoke-static {p0, p1}, Lf/a/b/n;->g(Landroidx/fragment/app/Fragment;I)V
|
|
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public getContentViewResId()I
|
|
.locals 1
|
|
|
|
const v0, 0x7f0d01b3
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public synthetic h(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;JLandroid/view/View;)V
|
|
.locals 2
|
|
|
|
iget-object p4, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->roleName:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
invoke-virtual {p4}, Landroid/widget/LinearLayout;->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 p4
|
|
|
|
invoke-static {p4}, Lcom/discord/restapi/RestAPIParams$Role;->createWithRole(Lcom/discord/models/domain/ModelGuildRole;)Lcom/discord/restapi/RestAPIParams$Role;
|
|
|
|
move-result-object p4
|
|
|
|
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()J
|
|
|
|
move-result-wide v0
|
|
|
|
xor-long/2addr p2, v0
|
|
|
|
invoke-static {p2, p3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p4, p2}, Lcom/discord/restapi/RestAPIParams$Role;->setPermissions(Ljava/lang/Long;)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, p4}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->patchRole(JLcom/discord/restapi/RestAPIParams$Role;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic i(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}, Lf/a/b/f;->onBackPressed()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic k(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 l(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}, Lf/a/b/n;->i(Landroidx/fragment/app/Fragment;Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic m(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;Landroid/view/View;)V
|
|
.locals 2
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->roleName:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
invoke-virtual {p2}, Landroid/widget/LinearLayout;->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 n(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;Landroid/view/View;)V
|
|
.locals 2
|
|
|
|
iget-object p2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->roleName:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
invoke-virtual {p2}, Landroid/widget/LinearLayout;->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 o(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, 0x7f0a05ba
|
|
|
|
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 {}, Lf/a/b/q;->e()Lrx/Observable$c;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p0}, Lf/a/b/q;->r(Lcom/discord/app/AppComponent;)Lrx/Observable$c;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance p2, Lf/a/o/e/b1;
|
|
|
|
invoke-direct {p2, p0}, Lf/a/o/e/b1;-><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}, Lf/a/b/q;->l(Lrx/functions/Action1;Landroid/content/Context;)Lrx/Observable$c;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1, p2}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
:goto_0
|
|
return-void
|
|
.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, 0x7f0a0762
|
|
|
|
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, 0x7f0a075e
|
|
|
|
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, 0x7f0a0318
|
|
|
|
invoke-virtual {p1, v1}, Landroid/view/View;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
iput-object v1, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->roleName:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
const v1, 0x7f0a075f
|
|
|
|
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, 0x7f0a0761
|
|
|
|
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, 0x7f0a0319
|
|
|
|
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, 0x7f0a0764
|
|
|
|
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, 0x7f0a076e
|
|
|
|
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, 0x7f0a075a
|
|
|
|
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, 0x7f0a075b
|
|
|
|
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, 0x7f0a075c
|
|
|
|
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, 0x7f0a075d
|
|
|
|
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, 0x7f0a0760
|
|
|
|
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, 0x7f0a0763
|
|
|
|
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, 0x7f0a0765
|
|
|
|
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, 0x7f0a0766
|
|
|
|
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, 0x7f0a0768
|
|
|
|
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, 0x7f0a0769
|
|
|
|
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, 0x7f0a0767
|
|
|
|
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, 0x7f0a076a
|
|
|
|
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, 0x7f0a076b
|
|
|
|
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, 0x7f0a076c
|
|
|
|
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, 0x7f0a076d
|
|
|
|
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, 0x7f0a0770
|
|
|
|
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, 0x7f0a0771
|
|
|
|
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, 0x7f0a0772
|
|
|
|
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, 0x7f0a0773
|
|
|
|
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, 0x7f0a0774
|
|
|
|
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, 0x7f0a0759
|
|
|
|
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, 0x7f0a0775
|
|
|
|
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, 0x7f0a0776
|
|
|
|
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, 0x7f0a077a
|
|
|
|
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, 0x7f0a0779
|
|
|
|
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, 0x7f0a0777
|
|
|
|
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, 0x7f0a0778
|
|
|
|
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, 0x7f0a077b
|
|
|
|
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/view/View;
|
|
|
|
iget-object v2, p0, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;->roleName:Lcom/google/android/material/textfield/TextInputLayout;
|
|
|
|
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/view/View;)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-string v1, "INTENT_EXTRA_GUILD_ID"
|
|
|
|
const-wide/16 v2, -0x1
|
|
|
|
invoke-virtual {v0, v1, v2, v3}, Landroid/content/Intent;->getLongExtra(Ljava/lang/String;J)J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/app/AppFragment;->getMostRecentIntent()Landroid/content/Intent;
|
|
|
|
move-result-object v4
|
|
|
|
const-string v5, "INTENT_EXTRA_ROLE_ID"
|
|
|
|
invoke-virtual {v4, v5, v2, v3}, Landroid/content/Intent;->getLongExtra(Ljava/lang/String;J)J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-static {v0, v1, v2, v3}, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole$Model;->access$000(JJ)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p0}, Lf/a/b/q;->r(Lcom/discord/app/AppComponent;)Lrx/Observable$c;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lf/a/o/e/c1;
|
|
|
|
invoke-direct {v1, p0}, Lf/a/o/e/c1;-><init>(Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;)V
|
|
|
|
const-class v2, Lcom/discord/widgets/servers/WidgetServerSettingsEditRole;
|
|
|
|
invoke-static {v1, v2}, Lf/a/b/q;->g(Lrx/functions/Action1;Ljava/lang/Class;)Lrx/Observable$c;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->k(Lrx/Observable$c;)Lrx/Observable;
|
|
|
|
invoke-virtual {p0}, Landroidx/fragment/app/Fragment;->getParentFragmentManager()Landroidx/fragment/app/FragmentManager;
|
|
|
|
move-result-object v0
|
|
|
|
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
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
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_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public synthetic p(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}, Lf/a/b/n;->i(Landroidx/fragment/app/Fragment;Ljava/lang/CharSequence;)V
|
|
|
|
return-void
|
|
.end method
|