apkfuckery/com.discord/smali/com/discord/widgets/settings/WidgetSettingsNotifications.smali
2019-02-04 21:05:16 +01:00

444 lines
12 KiB
Smali

.class public Lcom/discord/widgets/settings/WidgetSettingsNotifications;
.super Lcom/discord/utilities/app/AppFragment;
.source "WidgetSettingsNotifications.java"
# instance fields
.field blinkToggle:Landroid/view/View;
.annotation build Lbutterknife/Bind;
value = {
0x7f0e01ef
}
.end annotation
.end field
.field enabledToggle:Landroid/view/View;
.annotation build Lbutterknife/Bind;
value = {
0x7f0e01ea
}
.end annotation
.end field
.field settingsWrap:Landroid/view/View;
.annotation build Lbutterknife/Bind;
value = {
0x7f0e01eb
}
.end annotation
.end field
.field soundsToggle:Landroid/view/View;
.annotation build Lbutterknife/Bind;
value = {
0x7f0e01f5
}
.end annotation
.end field
.field vibrateToggle:Landroid/view/View;
.annotation build Lbutterknife/Bind;
value = {
0x7f0e01f1
}
.end annotation
.end field
.field wakeLockToggle:Landroid/view/View;
.annotation build Lbutterknife/Bind;
value = {
0x7f0e01ed
}
.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/settings/WidgetSettingsNotifications;Z)V
.locals 0
invoke-direct {p0, p1}, Lcom/discord/widgets/settings/WidgetSettingsNotifications;->configureEnabledUI(Z)V
return-void
.end method
.method private configureEnabledUI(Z)V
.locals 2
.param p1, "enabled" # Z
.prologue
iget-object v0, p0, Lcom/discord/widgets/settings/WidgetSettingsNotifications;->enabledToggle:Landroid/view/View;
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/discord/widgets/settings/WidgetSettingsNotifications;->enabledToggle:Landroid/view/View;
invoke-virtual {v0, p1}, Landroid/view/View;->setEnabled(Z)V
:cond_0
iget-object v0, p0, Lcom/discord/widgets/settings/WidgetSettingsNotifications;->settingsWrap:Landroid/view/View;
if-eqz v0, :cond_1
iget-object v1, p0, Lcom/discord/widgets/settings/WidgetSettingsNotifications;->settingsWrap:Landroid/view/View;
if-eqz p1, :cond_2
const/4 v0, 0x0
:goto_0
invoke-virtual {v1, v0}, Landroid/view/View;->setVisibility(I)V
:cond_1
return-void
:cond_2
const/16 v0, 0x8
goto :goto_0
.end method
# virtual methods
.method public getContentViewResId()Ljava/lang/Integer;
.locals 1
.prologue
const v0, 0x7f04008b
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
move-result-object v0
return-object v0
.end method
.method public onCreateViewOrOnResume()V
.locals 3
.prologue
invoke-super {p0}, Lcom/discord/utilities/app/AppFragment;->onCreateViewOrOnResume()V
invoke-static {}, Lcom/discord/stores/StoreNotifications;->getEnabled()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/settings/WidgetSettingsNotifications$$Lambda$1;->lambdaFactory$(Lcom/discord/widgets/settings/WidgetSettingsNotifications;)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;
invoke-static {}, Lcom/discord/stores/StoreNotifications;->getWakeUpDevice()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
iget-object v1, p0, Lcom/discord/widgets/settings/WidgetSettingsNotifications;->wakeLockToggle:Landroid/view/View;
invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
invoke-static {v1}, Lcom/discord/widgets/settings/WidgetSettingsNotifications$$Lambda$2;->lambdaFactory$(Landroid/view/View;)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;
invoke-static {}, Lcom/discord/stores/StoreNotifications;->getNotificationLightDisabled()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
iget-object v1, p0, Lcom/discord/widgets/settings/WidgetSettingsNotifications;->blinkToggle:Landroid/view/View;
invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
invoke-static {v1}, Lcom/discord/widgets/settings/WidgetSettingsNotifications$$Lambda$3;->lambdaFactory$(Landroid/view/View;)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;
invoke-static {}, Lcom/discord/stores/StoreNotifications;->getNotificationsVibrateDisabled()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
iget-object v1, p0, Lcom/discord/widgets/settings/WidgetSettingsNotifications;->vibrateToggle:Landroid/view/View;
invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
invoke-static {v1}, Lcom/discord/widgets/settings/WidgetSettingsNotifications$$Lambda$4;->lambdaFactory$(Landroid/view/View;)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;
invoke-static {}, Lcom/discord/stores/StoreNotifications;->getNotificationSoundDisabled()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
iget-object v1, p0, Lcom/discord/widgets/settings/WidgetSettingsNotifications;->soundsToggle:Landroid/view/View;
invoke-virtual {v1}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
invoke-static {v1}, Lcom/discord/widgets/settings/WidgetSettingsNotifications$$Lambda$5;->lambdaFactory$(Landroid/view/View;)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
.method onEnabled()V
.locals 1
.annotation build Lbutterknife/OnClick;
value = {
0x7f0e01e9
}
.end annotation
.prologue
iget-object v0, p0, Lcom/discord/widgets/settings/WidgetSettingsNotifications;->enabledToggle:Landroid/view/View;
invoke-virtual {v0}, Landroid/view/View;->isEnabled()Z
move-result v0
if-nez v0, :cond_0
const/4 v0, 0x1
:goto_0
invoke-static {v0}, Lcom/discord/stores/StoreNotifications$Actions;->setEnabled(Z)V
return-void
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method onNotificationBlink()V
.locals 1
.annotation build Lbutterknife/OnClick;
value = {
0x7f0e01ee
}
.end annotation
.prologue
iget-object v0, p0, Lcom/discord/widgets/settings/WidgetSettingsNotifications;->blinkToggle:Landroid/view/View;
invoke-virtual {v0}, Landroid/view/View;->isEnabled()Z
move-result v0
if-nez v0, :cond_0
const/4 v0, 0x1
:goto_0
invoke-static {v0}, Lcom/discord/stores/StoreNotifications$Actions;->setNotificationLightDisabled(Z)V
return-void
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method onNotificationVibrations()V
.locals 1
.annotation build Lbutterknife/OnClick;
value = {
0x7f0e01f0
}
.end annotation
.prologue
iget-object v0, p0, Lcom/discord/widgets/settings/WidgetSettingsNotifications;->vibrateToggle:Landroid/view/View;
invoke-virtual {v0}, Landroid/view/View;->isEnabled()Z
move-result v0
if-nez v0, :cond_0
const/4 v0, 0x1
:goto_0
invoke-static {v0}, Lcom/discord/stores/StoreNotifications$Actions;->setNotificationsVibrateDisabled(Z)V
return-void
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method onNotificationWakeLock()V
.locals 1
.annotation build Lbutterknife/OnClick;
value = {
0x7f0e01ec
}
.end annotation
.prologue
iget-object v0, p0, Lcom/discord/widgets/settings/WidgetSettingsNotifications;->wakeLockToggle:Landroid/view/View;
invoke-virtual {v0}, Landroid/view/View;->isEnabled()Z
move-result v0
if-nez v0, :cond_0
const/4 v0, 0x1
:goto_0
invoke-static {v0}, Lcom/discord/stores/StoreNotifications$Actions;->setWakeUpDevice(Z)V
return-void
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method onNotificationsMuteAll()V
.locals 1
.annotation build Lbutterknife/OnClick;
value = {
0x7f0e01f4
}
.end annotation
.prologue
iget-object v0, p0, Lcom/discord/widgets/settings/WidgetSettingsNotifications;->soundsToggle:Landroid/view/View;
invoke-virtual {v0}, Landroid/view/View;->isEnabled()Z
move-result v0
if-nez v0, :cond_0
const/4 v0, 0x1
:goto_0
invoke-static {v0}, Lcom/discord/stores/StoreNotifications$Actions;->setNotificationSoundDisabled(Z)V
return-void
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method
.method onNotificationsSound()V
.locals 1
.annotation build Lbutterknife/OnClick;
value = {
0x7f0e01f2
}
.end annotation
.prologue
const v0, 0x7f060512
invoke-static {p0, v0}, Lcom/discord/utilities/app/AppToast;->show(Landroid/support/v4/app/Fragment;I)V
return-void
.end method