mirror of
				https://github.com/mihonapp/mihon.git
				synced 2025-11-04 16:18:55 +01:00 
			
		
		
		
	Enable app auto update by default
This commit is contained in:
		@@ -20,7 +20,14 @@ object Migrations {
 | 
			
		||||
        if (oldVersion < BuildConfig.VERSION_CODE) {
 | 
			
		||||
            preferences.lastVersionCode().set(BuildConfig.VERSION_CODE)
 | 
			
		||||
 | 
			
		||||
            if (oldVersion == 0) return false
 | 
			
		||||
            // Fresh install
 | 
			
		||||
            if (oldVersion == 0) {
 | 
			
		||||
                // Set up default app updater task
 | 
			
		||||
                if (BuildConfig.INCLUDE_UPDATER && preferences.automaticUpdates()) {
 | 
			
		||||
                    UpdaterJob.setupTask(context)
 | 
			
		||||
                }
 | 
			
		||||
                return false
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            if (oldVersion < 14) {
 | 
			
		||||
                // Restore jobs after upgrading to Evernote's job scheduler.
 | 
			
		||||
 
 | 
			
		||||
@@ -186,7 +186,7 @@ class PreferencesHelper(val context: Context) {
 | 
			
		||||
 | 
			
		||||
    fun librarySortingAscending() = rxPrefs.getBoolean("library_sorting_ascending", true)
 | 
			
		||||
 | 
			
		||||
    fun automaticUpdates() = prefs.getBoolean(Keys.automaticUpdates, false)
 | 
			
		||||
    fun automaticUpdates() = prefs.getBoolean(Keys.automaticUpdates, true)
 | 
			
		||||
 | 
			
		||||
    fun hiddenCatalogues() = rxPrefs.getStringSet("hidden_catalogues", emptySet())
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -56,7 +56,7 @@ class AboutController : SettingsController() {
 | 
			
		||||
            key = Keys.automaticUpdates
 | 
			
		||||
            titleRes = R.string.pref_enable_automatic_updates
 | 
			
		||||
            summaryRes = R.string.pref_enable_automatic_updates_summary
 | 
			
		||||
            defaultValue = false
 | 
			
		||||
            defaultValue = true
 | 
			
		||||
 | 
			
		||||
            if (isUpdaterEnabled) {
 | 
			
		||||
                onChange { newValue ->
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user