mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-11-07 20:57:02 +01:00
fix: sb does not turn off
This commit is contained in:
parent
a2a515d2d9
commit
97c184b5fb
@ -33,13 +33,14 @@ public class ReturnYouTubeDislikeSettingsFragment extends PreferenceFragment {
|
|||||||
SwitchPreference preference = new SwitchPreference(context);
|
SwitchPreference preference = new SwitchPreference(context);
|
||||||
preferenceScreen.addPreference(preference);
|
preferenceScreen.addPreference(preference);
|
||||||
preference.setKey(SettingsEnum.RYD_ENABLED.getPath());
|
preference.setKey(SettingsEnum.RYD_ENABLED.getPath());
|
||||||
preference.setDefaultValue(false);
|
preference.setDefaultValue(SettingsEnum.RYD_ENABLED.getDefaultValue());
|
||||||
preference.setChecked(SettingsEnum.RYD_ENABLED.getBoolean());
|
preference.setChecked(SettingsEnum.RYD_ENABLED.getBoolean());
|
||||||
preference.setTitle(str("revanced_ryd_title"));
|
preference.setTitle(str("revanced_ryd_title"));
|
||||||
preference.setSummary(str("revanced_ryd_summary"));
|
preference.setSummary(str("revanced_ryd_summary"));
|
||||||
preference.setOnPreferenceChangeListener((pref, newValue) -> {
|
preference.setOnPreferenceChangeListener((pref, newValue) -> {
|
||||||
final boolean value = (Boolean) newValue;
|
final boolean value = (Boolean) newValue;
|
||||||
ReturnYouTubeDislike.onEnabledChange(value);
|
ReturnYouTubeDislike.onEnabledChange(value);
|
||||||
|
SettingsEnum.RYD_ENABLED.saveValue(value);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -66,6 +66,7 @@ public class SponsorBlockSettingsFragment extends PreferenceFragment implements
|
|||||||
preference.setOnPreferenceChangeListener((preference1, newValue) -> {
|
preference.setOnPreferenceChangeListener((preference1, newValue) -> {
|
||||||
final boolean value = (Boolean) newValue;
|
final boolean value = (Boolean) newValue;
|
||||||
enableCategoriesIfNeeded(value);
|
enableCategoriesIfNeeded(value);
|
||||||
|
SettingsEnum.SB_ENABLED.saveValue(newValue);
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user