From 342b3191ac69c5d0e114677e1c552338b3c55e8a Mon Sep 17 00:00:00 2001 From: Somethingweirdhere Date: Fri, 11 May 2018 17:17:07 +0200 Subject: [PATCH] Changed to lambda convention --- .../settings/ContentSettingsFragment.java | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java b/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java index dde606161..a02a9df34 100644 --- a/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java +++ b/app/src/main/java/org/schabi/newpipe/settings/ContentSettingsFragment.java @@ -274,22 +274,16 @@ public class ContentSettingsFragment extends BasePreferenceFragment { AlertDialog.Builder alert = new AlertDialog.Builder(getContext()); alert.setTitle(R.string.import_settings); - alert.setNegativeButton(android.R.string.no, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - dialog.dismiss(); - // restart app to properly load db - System.exit(0); - } + alert.setNegativeButton(android.R.string.no, (dialog, which) -> { + dialog.dismiss(); + // restart app to properly load db + System.exit(0); }); - alert.setPositiveButton(android.R.string.yes, new DialogInterface.OnClickListener() { - @Override - public void onClick(DialogInterface dialog, int which) { - dialog.dismiss(); - loadSharedPreferences(newpipe_settings); - // restart app to properly load db - System.exit(0); - } + alert.setPositiveButton(android.R.string.yes, (dialog, which) -> { + dialog.dismiss(); + loadSharedPreferences(newpipe_settings); + // restart app to properly load db + System.exit(0); }); alert.show(); } else {