Skip to content

Commit

Permalink
fix: sb does not turn off
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJeterLP committed Jul 31, 2022
1 parent a2a515d commit 97c184b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@ public void onCreate(Bundle savedInstanceState) {
SwitchPreference preference = new SwitchPreference(context);
preferenceScreen.addPreference(preference);
preference.setKey(SettingsEnum.RYD_ENABLED.getPath());
preference.setDefaultValue(false);
preference.setDefaultValue(SettingsEnum.RYD_ENABLED.getDefaultValue());
preference.setChecked(SettingsEnum.RYD_ENABLED.getBoolean());
preference.setTitle(str("revanced_ryd_title"));
preference.setSummary(str("revanced_ryd_summary"));
preference.setOnPreferenceChangeListener((pref, newValue) -> {
final boolean value = (Boolean) newValue;
ReturnYouTubeDislike.onEnabledChange(value);
SettingsEnum.RYD_ENABLED.saveValue(value);
return true;
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public void onCreate(Bundle savedInstanceState) {
preference.setOnPreferenceChangeListener((preference1, newValue) -> {
final boolean value = (Boolean) newValue;
enableCategoriesIfNeeded(value);
SettingsEnum.SB_ENABLED.saveValue(newValue);
return true;
});
}
Expand Down

0 comments on commit 97c184b

Please sign in to comment.