mirror of
https://github.com/TeamNewPipe/NewPipe.git
synced 2024-11-25 20:42:34 +01:00
Cleanup up some code
This commit is contained in:
parent
5c9705d94e
commit
467bd21de2
@ -1,5 +1,7 @@
|
|||||||
package org.schabi.newpipe.settings;
|
package org.schabi.newpipe.settings;
|
||||||
|
|
||||||
|
import static org.schabi.newpipe.CheckForNewAppVersion.startNewVersionCheckService;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.widget.Toast;
|
import android.widget.Toast;
|
||||||
|
|
||||||
@ -7,8 +9,6 @@ import androidx.preference.Preference;
|
|||||||
|
|
||||||
import org.schabi.newpipe.R;
|
import org.schabi.newpipe.R;
|
||||||
|
|
||||||
import static org.schabi.newpipe.CheckForNewAppVersion.startNewVersionCheckService;
|
|
||||||
|
|
||||||
public class UpdateSettingsFragment extends BasePreferenceFragment {
|
public class UpdateSettingsFragment extends BasePreferenceFragment {
|
||||||
private final Preference.OnPreferenceChangeListener updatePreferenceChange
|
private final Preference.OnPreferenceChangeListener updatePreferenceChange
|
||||||
= (preference, checkForUpdates) -> {
|
= (preference, checkForUpdates) -> {
|
||||||
@ -40,9 +40,9 @@ public class UpdateSettingsFragment extends BasePreferenceFragment {
|
|||||||
public void onCreatePreferences(final Bundle savedInstanceState, final String rootKey) {
|
public void onCreatePreferences(final Bundle savedInstanceState, final String rootKey) {
|
||||||
addPreferencesFromResource(R.xml.update_settings);
|
addPreferencesFromResource(R.xml.update_settings);
|
||||||
|
|
||||||
final String updateToggleKey = getString(R.string.update_app_key);
|
findPreference(getString(R.string.update_app_key))
|
||||||
final String manualUpdateKey = getString(R.string.manual_update_key);
|
.setOnPreferenceChangeListener(updatePreferenceChange);
|
||||||
findPreference(updateToggleKey).setOnPreferenceChangeListener(updatePreferenceChange);
|
findPreference(getString(R.string.manual_update_key))
|
||||||
findPreference(manualUpdateKey).setOnPreferenceClickListener(manualUpdateClick);
|
.setOnPreferenceClickListener(manualUpdateClick);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user