833 lines
27 KiB
Smali
833 lines
27 KiB
Smali
.class public Lcom/discord/widgets/servers/WidgetServerNotifications;
|
|
.super Lcom/discord/utilities/app/AppFragment;
|
|
.source "WidgetServerNotifications.java"
|
|
|
|
|
|
# instance fields
|
|
.field frequencyMentionsLabel:Landroid/widget/TextView;
|
|
.annotation build Lbutterknife/Bind;
|
|
value = {
|
|
0x7f0e01b8
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field frequencyRadioAll:Ljava/util/List;
|
|
.annotation build Lbutterknife/Bind;
|
|
value = {
|
|
0x7f0e01b4,
|
|
0x7f0e01b5
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List",
|
|
"<",
|
|
"Landroid/view/View;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field frequencyRadioMentions:Ljava/util/List;
|
|
.annotation build Lbutterknife/Bind;
|
|
value = {
|
|
0x7f0e01b6,
|
|
0x7f0e01b7
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List",
|
|
"<",
|
|
"Landroid/view/View;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field frequencyRadioNothing:Ljava/util/List;
|
|
.annotation build Lbutterknife/Bind;
|
|
value = {
|
|
0x7f0e01b9,
|
|
0x7f0e01ba
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List",
|
|
"<",
|
|
"Landroid/view/View;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field frequencyWrap:Landroid/view/View;
|
|
.annotation build Lbutterknife/Bind;
|
|
value = {
|
|
0x7f0e01b3
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field notificationsEveryone:Landroid/view/View;
|
|
.annotation build Lbutterknife/Bind;
|
|
value = {
|
|
0x7f0e01bb
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field notificationsEveryoneLabel:Landroid/widget/TextView;
|
|
.annotation build Lbutterknife/Bind;
|
|
value = {
|
|
0x7f0e01bd
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field notificationsEveryoneToggle:Landroid/view/View;
|
|
.annotation build Lbutterknife/Bind;
|
|
value = {
|
|
0x7f0e01bc
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field notificationsMute:Landroid/view/View;
|
|
.annotation build Lbutterknife/Bind;
|
|
value = {
|
|
0x7f0e01b0
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field notificationsMuteLabel:Landroid/widget/TextView;
|
|
.annotation build Lbutterknife/Bind;
|
|
value = {
|
|
0x7f0e01b2
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field notificationsMuteToggle:Landroid/view/View;
|
|
.annotation build Lbutterknife/Bind;
|
|
value = {
|
|
0x7f0e01b1
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field notificationsPush:Landroid/view/View;
|
|
.annotation build Lbutterknife/Bind;
|
|
value = {
|
|
0x7f0e01bf
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field notificationsPushToggle:Landroid/view/View;
|
|
.annotation build Lbutterknife/Bind;
|
|
value = {
|
|
0x7f0e01c0
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field notificationsPushWrap:Landroid/view/View;
|
|
.annotation build Lbutterknife/Bind;
|
|
value = {
|
|
0x7f0e01be
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.prologue
|
|
invoke-direct {p0}, Lcom/discord/utilities/app/AppFragment;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic access$lambda$0(Lcom/discord/widgets/servers/WidgetServerNotifications;Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/widgets/servers/WidgetServerNotifications;->configureUI(Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic access$lambda$1(Lcom/discord/widgets/servers/WidgetServerNotifications;Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;Landroid/view/View;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/widgets/servers/WidgetServerNotifications;->lambda$configureUI$740(Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;Landroid/view/View;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic access$lambda$2(Lcom/discord/widgets/servers/WidgetServerNotifications;Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;Landroid/view/View;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/widgets/servers/WidgetServerNotifications;->lambda$configureUI$741(Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;Landroid/view/View;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic access$lambda$3(Lcom/discord/widgets/servers/WidgetServerNotifications;Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;Landroid/view/View;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1, p2}, Lcom/discord/widgets/servers/WidgetServerNotifications;->lambda$configureUI$742(Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;Landroid/view/View;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic access$lambda$4(Lcom/discord/widgets/servers/WidgetServerNotifications;Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;ILandroid/view/View;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/widgets/servers/WidgetServerNotifications;->lambda$configureRadio$743(Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;ILandroid/view/View;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private configureRadio(Ljava/util/List;ILcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;)V
|
|
.locals 4
|
|
.param p2, "type" # I
|
|
.param p3, "selected" # Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List",
|
|
"<",
|
|
"Landroid/view/View;",
|
|
">;I",
|
|
"Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
.prologue
|
|
.local p1, "radio":Ljava/util/List;, "Ljava/util/List<Landroid/view/View;>;"
|
|
const/4 v1, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-interface {p1, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/view/View;
|
|
|
|
invoke-virtual {p3}, Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;->getMessageNotifications()I
|
|
|
|
move-result v3
|
|
|
|
if-ne v3, p2, :cond_2
|
|
|
|
:goto_0
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setEnabled(Z)V
|
|
|
|
:cond_0
|
|
invoke-interface {p1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-interface {p1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/view/View;
|
|
|
|
invoke-static {p0, p3, p2}, Lcom/discord/widgets/servers/WidgetServerNotifications$$Lambda$5;->lambdaFactory$(Lcom/discord/widgets/servers/WidgetServerNotifications;Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;I)Landroid/view/View$OnClickListener;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
|
|
:cond_2
|
|
move v1, v2
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method private configureUI(Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;)V
|
|
.locals 8
|
|
.param p1, "selected" # Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;
|
|
.annotation build Landroid/support/annotation/Nullable;
|
|
.end annotation
|
|
.end param
|
|
|
|
.prologue
|
|
const/16 v1, 0x8
|
|
|
|
const/4 v6, 0x1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/servers/WidgetServerNotifications;->getActivity()Landroid/support/v4/app/FragmentActivity;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Landroid/support/v4/app/FragmentActivity;->onBackPressed()V
|
|
|
|
:goto_0
|
|
return-void
|
|
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/discord/widgets/servers/WidgetServerNotifications;->getAppActivity()Lcom/discord/utilities/app/AppActivity;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/app/AppActivity;->getSupportActionBar()Landroid/support/v7/app/ActionBar;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/servers/WidgetServerNotifications;->getAppActivity()Lcom/discord/utilities/app/AppActivity;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/app/AppActivity;->getSupportActionBar()Landroid/support/v7/app/ActionBar;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v6}, Landroid/support/v7/app/ActionBar;->setDisplayHomeAsUpEnabled(Z)V
|
|
|
|
:cond_1
|
|
invoke-virtual {p0}, Lcom/discord/widgets/servers/WidgetServerNotifications;->getAppActivity()Lcom/discord/utilities/app/AppActivity;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/app/AppActivity;->getCustomViewTitle()Lcom/discord/views/ToolbarTitleLayout;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/servers/WidgetServerNotifications;->getAppActivity()Lcom/discord/utilities/app/AppActivity;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/app/AppActivity;->getCustomViewTitle()Lcom/discord/views/ToolbarTitleLayout;
|
|
|
|
move-result-object v0
|
|
|
|
const v3, 0x7f0601ca
|
|
|
|
invoke-virtual {v0, v3}, Lcom/discord/views/ToolbarTitleLayout;->setTitle(I)V
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/servers/WidgetServerNotifications;->getAppActivity()Lcom/discord/utilities/app/AppActivity;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/utilities/app/AppActivity;->getCustomViewTitle()Lcom/discord/views/ToolbarTitleLayout;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelGuild;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v0, v3, v2}, Lcom/discord/views/ToolbarTitleLayout;->setSubtitle(Ljava/lang/CharSequence;I)V
|
|
|
|
:cond_2
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->frequencyWrap:Landroid/view/View;
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
iget-object v3, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->frequencyWrap:Landroid/view/View;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;->getGuildSettings()Lcom/discord/models/domain/ModelUserGuildSettings;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/models/domain/ModelUserGuildSettings;->isMuted()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_e
|
|
|
|
move v0, v1
|
|
|
|
:goto_1
|
|
invoke-virtual {v3, v0}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
:cond_3
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->notificationsMute:Landroid/view/View;
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->notificationsMute:Landroid/view/View;
|
|
|
|
invoke-static {p0, p1}, Lcom/discord/widgets/servers/WidgetServerNotifications$$Lambda$2;->lambdaFactory$(Lcom/discord/widgets/servers/WidgetServerNotifications;Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;)Landroid/view/View$OnClickListener;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v0, v3}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
:cond_4
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->notificationsMuteToggle:Landroid/view/View;
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->notificationsMuteToggle:Landroid/view/View;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;->getGuildSettings()Lcom/discord/models/domain/ModelUserGuildSettings;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelUserGuildSettings;->isMuted()Z
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {v0, v3}, Landroid/view/View;->setEnabled(Z)V
|
|
|
|
:cond_5
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->notificationsMuteLabel:Landroid/widget/TextView;
|
|
|
|
if-eqz v0, :cond_6
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->notificationsMuteLabel:Landroid/widget/TextView;
|
|
|
|
new-instance v3, Lcom/miguelgaeta/spanner/Spanner;
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/servers/WidgetServerNotifications;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v4
|
|
|
|
const v5, 0x7f06029a
|
|
|
|
new-array v6, v6, [Ljava/lang/Object;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v7}, Lcom/discord/models/domain/ModelGuild;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
aput-object v7, v6, v2
|
|
|
|
invoke-direct {v3, v4, v5, v6}, Lcom/miguelgaeta/spanner/Spanner;-><init>(Landroid/content/Context;I[Ljava/lang/Object;)V
|
|
|
|
invoke-virtual {v3}, Lcom/miguelgaeta/spanner/Spanner;->addMarkdownBoldStrategy()Lcom/miguelgaeta/spanner/Spanner;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Lcom/miguelgaeta/spanner/Spanner;->toSpannableString()Landroid/text/SpannableString;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v0, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
:cond_6
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->notificationsEveryone:Landroid/view/View;
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->notificationsEveryone:Landroid/view/View;
|
|
|
|
invoke-static {p0, p1}, Lcom/discord/widgets/servers/WidgetServerNotifications$$Lambda$3;->lambdaFactory$(Lcom/discord/widgets/servers/WidgetServerNotifications;Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;)Landroid/view/View$OnClickListener;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v0, v3}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
:cond_7
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->notificationsEveryoneToggle:Landroid/view/View;
|
|
|
|
if-eqz v0, :cond_8
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->notificationsEveryoneToggle:Landroid/view/View;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;->getGuildSettings()Lcom/discord/models/domain/ModelUserGuildSettings;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelUserGuildSettings;->isSuppressEveryone()Z
|
|
|
|
move-result v3
|
|
|
|
invoke-virtual {v0, v3}, Landroid/view/View;->setEnabled(Z)V
|
|
|
|
:cond_8
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->notificationsEveryoneLabel:Landroid/widget/TextView;
|
|
|
|
if-eqz v0, :cond_9
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->notificationsEveryoneLabel:Landroid/widget/TextView;
|
|
|
|
new-instance v3, Lcom/miguelgaeta/spanner/Spanner;
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/servers/WidgetServerNotifications;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v4
|
|
|
|
const v5, 0x7f06035d
|
|
|
|
invoke-direct {v3, v4, v5}, Lcom/miguelgaeta/spanner/Spanner;-><init>(Landroid/content/Context;I)V
|
|
|
|
invoke-virtual {v3}, Lcom/miguelgaeta/spanner/Spanner;->addMarkdownBoldStrategy()Lcom/miguelgaeta/spanner/Spanner;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Lcom/miguelgaeta/spanner/Spanner;->toSpannableString()Landroid/text/SpannableString;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v0, v3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
:cond_9
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->notificationsPushWrap:Landroid/view/View;
|
|
|
|
if-eqz v0, :cond_a
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->notificationsPushWrap:Landroid/view/View;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;->getGuildSettings()Lcom/discord/models/domain/ModelUserGuildSettings;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelUserGuildSettings;->isMuted()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_f
|
|
|
|
:goto_2
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setVisibility(I)V
|
|
|
|
:cond_a
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->notificationsPush:Landroid/view/View;
|
|
|
|
if-eqz v0, :cond_b
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->notificationsPush:Landroid/view/View;
|
|
|
|
invoke-static {p0, p1}, Lcom/discord/widgets/servers/WidgetServerNotifications$$Lambda$4;->lambdaFactory$(Lcom/discord/widgets/servers/WidgetServerNotifications;Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;)Landroid/view/View$OnClickListener;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
:cond_b
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->notificationsPushToggle:Landroid/view/View;
|
|
|
|
if-eqz v0, :cond_c
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->notificationsPushToggle:Landroid/view/View;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;->getGuildSettings()Lcom/discord/models/domain/ModelUserGuildSettings;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelUserGuildSettings;->isMobilePush()Z
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/view/View;->setEnabled(Z)V
|
|
|
|
:cond_c
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->frequencyMentionsLabel:Landroid/widget/TextView;
|
|
|
|
if-eqz v0, :cond_d
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->frequencyMentionsLabel:Landroid/widget/TextView;
|
|
|
|
new-instance v1, Lcom/miguelgaeta/spanner/Spanner;
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/servers/WidgetServerNotifications;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
const v3, 0x7f060358
|
|
|
|
invoke-direct {v1, v2, v3}, Lcom/miguelgaeta/spanner/Spanner;-><init>(Landroid/content/Context;I)V
|
|
|
|
invoke-virtual {v1}, Lcom/miguelgaeta/spanner/Spanner;->addMarkdownBoldStrategy()Lcom/miguelgaeta/spanner/Spanner;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/miguelgaeta/spanner/Spanner;->toSpannableString()Landroid/text/SpannableString;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V
|
|
|
|
:cond_d
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->frequencyRadioAll:Ljava/util/List;
|
|
|
|
sget v1, Lcom/discord/models/domain/ModelUserGuildSettings;->FREQUENCY_ALL:I
|
|
|
|
invoke-direct {p0, v0, v1, p1}, Lcom/discord/widgets/servers/WidgetServerNotifications;->configureRadio(Ljava/util/List;ILcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->frequencyRadioMentions:Ljava/util/List;
|
|
|
|
sget v1, Lcom/discord/models/domain/ModelUserGuildSettings;->FREQUENCY_MENTIONS:I
|
|
|
|
invoke-direct {p0, v0, v1, p1}, Lcom/discord/widgets/servers/WidgetServerNotifications;->configureRadio(Ljava/util/List;ILcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/widgets/servers/WidgetServerNotifications;->frequencyRadioNothing:Ljava/util/List;
|
|
|
|
sget v1, Lcom/discord/models/domain/ModelUserGuildSettings;->FREQUENCY_NOTHING:I
|
|
|
|
invoke-direct {p0, v0, v1, p1}, Lcom/discord/widgets/servers/WidgetServerNotifications;->configureRadio(Ljava/util/List;ILcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;)V
|
|
|
|
goto/16 :goto_0
|
|
|
|
:cond_e
|
|
move v0, v2
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_f
|
|
move v1, v2
|
|
|
|
goto :goto_2
|
|
.end method
|
|
|
|
.method private synthetic lambda$configureRadio$743(Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;ILandroid/view/View;)V
|
|
.locals 3
|
|
.param p3, "v" # Landroid/view/View;
|
|
|
|
.prologue
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getUserGuildSettings()Lcom/discord/stores/StoreUserGuildSettings;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/servers/WidgetServerNotifications;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v1, v2, p2}, Lcom/discord/stores/StoreUserGuildSettings;->setGuildFrequency(Landroid/content/Context;Lcom/discord/models/domain/ModelGuild;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private synthetic lambda$configureUI$740(Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;Landroid/view/View;)V
|
|
.locals 6
|
|
.param p2, "v" # Landroid/view/View;
|
|
|
|
.prologue
|
|
const/4 v3, 0x0
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getUserGuildSettings()Lcom/discord/stores/StoreUserGuildSettings;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/servers/WidgetServerNotifications;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;->getGuildSettings()Lcom/discord/models/domain/ModelUserGuildSettings;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelUserGuildSettings;->isMuted()Z
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
const/4 v4, 0x1
|
|
|
|
:goto_0
|
|
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object v4
|
|
|
|
move-object v5, v3
|
|
|
|
invoke-virtual/range {v0 .. v5}, Lcom/discord/stores/StoreUserGuildSettings;->setGuildToggles(Landroid/content/Context;Lcom/discord/models/domain/ModelGuild;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const/4 v4, 0x0
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method private synthetic lambda$configureUI$741(Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;Landroid/view/View;)V
|
|
.locals 6
|
|
.param p2, "v" # Landroid/view/View;
|
|
|
|
.prologue
|
|
const/4 v4, 0x0
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getUserGuildSettings()Lcom/discord/stores/StoreUserGuildSettings;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/servers/WidgetServerNotifications;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;->getGuildSettings()Lcom/discord/models/domain/ModelUserGuildSettings;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelUserGuildSettings;->isSuppressEveryone()Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_0
|
|
|
|
const/4 v3, 0x1
|
|
|
|
:goto_0
|
|
invoke-static {v3}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object v3
|
|
|
|
move-object v5, v4
|
|
|
|
invoke-virtual/range {v0 .. v5}, Lcom/discord/stores/StoreUserGuildSettings;->setGuildToggles(Landroid/content/Context;Lcom/discord/models/domain/ModelGuild;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const/4 v3, 0x0
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
.method private synthetic lambda$configureUI$742(Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;Landroid/view/View;)V
|
|
.locals 6
|
|
.param p2, "v" # Landroid/view/View;
|
|
|
|
.prologue
|
|
const/4 v3, 0x0
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getUserGuildSettings()Lcom/discord/stores/StoreUserGuildSettings;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0}, Lcom/discord/widgets/servers/WidgetServerNotifications;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;->getGuild()Lcom/discord/models/domain/ModelGuild;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelUserGuildSettings$SelectedGuild;->getGuildSettings()Lcom/discord/models/domain/ModelUserGuildSettings;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Lcom/discord/models/domain/ModelUserGuildSettings;->isMobilePush()Z
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_0
|
|
|
|
const/4 v4, 0x1
|
|
|
|
:goto_0
|
|
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object v5
|
|
|
|
move-object v4, v3
|
|
|
|
invoke-virtual/range {v0 .. v5}, Lcom/discord/stores/StoreUserGuildSettings;->setGuildToggles(Landroid/content/Context;Lcom/discord/models/domain/ModelGuild;Ljava/lang/Boolean;Ljava/lang/Boolean;Ljava/lang/Boolean;)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const/4 v4, 0x0
|
|
|
|
goto :goto_0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getContentViewResId()Ljava/lang/Integer;
|
|
.locals 1
|
|
|
|
.prologue
|
|
const v0, 0x7f040083
|
|
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public onActivityCreatedOrOnResume()V
|
|
.locals 3
|
|
|
|
.prologue
|
|
invoke-super {p0}, Lcom/discord/utilities/app/AppFragment;->onActivityCreatedOrOnResume()V
|
|
|
|
invoke-static {}, Lcom/discord/stores/StoreStream;->getUserGuildSettings()Lcom/discord/stores/StoreUserGuildSettings;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/discord/stores/StoreUserGuildSettings;->getSelectedGuildSettings()Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p0}, Lcom/discord/utilities/app/AppTransformers;->ui(Lcom/discord/utilities/app/AppFragment;)Lrx/Observable$Transformer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->compose(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p0}, Lcom/discord/widgets/servers/WidgetServerNotifications$$Lambda$1;->lambdaFactory$(Lcom/discord/widgets/servers/WidgetServerNotifications;)Lrx/functions/Action1;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v1, v2}, Lcom/discord/utilities/app/AppTransformers;->subscribe(Lrx/functions/Action1;Ljava/lang/Class;)Lrx/Observable$Transformer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lrx/Observable;->compose(Lrx/Observable$Transformer;)Lrx/Observable;
|
|
|
|
return-void
|
|
.end method
|