mirror of
				https://github.com/TeamNewPipe/NewPipe
				synced 2025-10-25 20:37:40 +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); |             NotificationWorker.initialize(this); | ||||||
|         } |         } | ||||||
|         if (!UpdateSettingsFragment.wasUserAskedForConsent(this) |         if (!UpdateSettingsFragment.wasUserAskedForConsent(this) | ||||||
|                 && ReleaseVersionUtil.INSTANCE.isReleaseApk() |                 && !App.getApp().isFirstRun() | ||||||
|                 && !App.getApp().isFirstRun()) { |                 && ReleaseVersionUtil.INSTANCE.isReleaseApk()) { | ||||||
|             UpdateSettingsFragment.askForConsentToUpdateChecks(this); |             UpdateSettingsFragment.askForConsentToUpdateChecks(this); | ||||||
|         } |         } | ||||||
|     } |     } | ||||||
| @@ -183,7 +183,8 @@ public class MainActivity extends AppCompatActivity { | |||||||
|         final App app = App.getApp(); |         final App app = App.getApp(); | ||||||
|         final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(app); |         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 |             // Start the worker which is checking all conditions | ||||||
|             // and eventually searching for a new version. |             // and eventually searching for a new version. | ||||||
|             NewVersionWorker.enqueueNewVersionCheckingWork(app, false); |             NewVersionWorker.enqueueNewVersionCheckingWork(app, false); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Stypox
					Stypox