mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-11-04 09:13:00 +00:00 
			
		
		
		
	Improve new version checks before running
This commit is contained in:
		@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user