mirror of
https://github.com/revanced/revanced-integrations.git
synced 2024-11-12 15:09:26 +01:00
fix(YouTube - Settings): Correctly initialize default values
This commit is contained in:
parent
9920116f63
commit
752544b962
@ -164,7 +164,7 @@ public abstract class AbstractPreferenceFragment extends PreferenceFragment {
|
||||
} else if (pref instanceof EditTextPreference) {
|
||||
EditTextPreference editPreference = (EditTextPreference) pref;
|
||||
if (applySettingToPreference) {
|
||||
editPreference.getEditText().setText(setting.get().toString());
|
||||
editPreference.setText(setting.get().toString());
|
||||
} else {
|
||||
Setting.privateSetValueFromString(setting, editPreference.getText());
|
||||
}
|
||||
|
@ -14,12 +14,12 @@ import app.revanced.integrations.youtube.settings.Settings;
|
||||
public class ReVancedPreferenceFragment extends AbstractPreferenceFragment {
|
||||
@Override
|
||||
protected void initialize() {
|
||||
super.initialize();
|
||||
|
||||
// If the preference was included, then initialize it based on the available playback speed
|
||||
Preference defaultSpeedPreference = findPreference(Settings.PLAYBACK_SPEED_DEFAULT.key);
|
||||
if (defaultSpeedPreference instanceof ListPreference) {
|
||||
CustomPlaybackSpeedPatch.initializeListPreference((ListPreference) defaultSpeedPreference);
|
||||
}
|
||||
|
||||
super.initialize();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user