mirror of
https://github.com/TeamNewPipe/NewPipe
synced 2024-11-05 17:46:24 +00:00
Improve new version checks before running
This commit is contained in:
parent
3703fed1a5
commit
92402685f8
@ -170,8 +170,8 @@ public class MainActivity extends AppCompatActivity {
|
||||
NotificationWorker.initialize(this);
|
||||
}
|
||||
if (!UpdateSettingsFragment.wasUserAskedForConsent(this)
|
||||
&& ReleaseVersionUtil.INSTANCE.isReleaseApk()
|
||||
&& !App.getApp().isFirstRun()) {
|
||||
&& !App.getApp().isFirstRun()
|
||||
&& ReleaseVersionUtil.INSTANCE.isReleaseApk()) {
|
||||
UpdateSettingsFragment.askForConsentToUpdateChecks(this);
|
||||
}
|
||||
}
|
||||
@ -183,7 +183,8 @@ public class MainActivity extends AppCompatActivity {
|
||||
final App app = App.getApp();
|
||||
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(app);
|
||||
|
||||
if (prefs.getBoolean(app.getString(R.string.update_app_key), false)) {
|
||||
if (prefs.getBoolean(app.getString(R.string.update_app_key), false)
|
||||
&& prefs.getBoolean(app.getString(R.string.update_check_consent_key), false)) {
|
||||
// Start the worker which is checking all conditions
|
||||
// and eventually searching for a new version.
|
||||
NewVersionWorker.enqueueNewVersionCheckingWork(app, false);
|
||||
|
Loading…
Reference in New Issue
Block a user