Refactoring

This commit is contained in:
M66B 2023-09-30 07:14:31 +02:00
parent 5f89592126
commit 035196e7cc
1 changed files with 14 additions and 12 deletions

View File

@ -528,19 +528,21 @@ public class ActivityMain extends AppCompatActivity implements SharedPreferences
super.onResume(); super.onResume();
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.R && Util.isPlayStoreInstall(this)) { if (Build.VERSION.SDK_INT > Build.VERSION_CODES.R) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
if (!prefs.getBoolean("qap", false)) { if (!prefs.getBoolean("qap", false))
new AlertDialog.Builder(this) if (Util.isPlayStoreInstall(this)) {
.setMessage(R.string.app_qap) new AlertDialog.Builder(this)
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() { .setMessage(R.string.app_qap)
@Override .setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) { @Override
prefs.edit().putBoolean("qap", true).apply(); public void onClick(DialogInterface dialog, int which) {
} prefs.edit().putBoolean("qap", true).apply();
}) }
.show(); })
} .show();
} else
prefs.edit().putBoolean("qap", true).apply();
} }
} }