mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 04:09:18 +01:00
Remove option to disabled auto checks for updates
This commit is contained in:
parent
d9fcf8f3f7
commit
2f192f4c4d
@ -33,7 +33,7 @@ object Migrations {
|
||||
preferences.lastVersionCode().set(BuildConfig.VERSION_CODE)
|
||||
|
||||
if (oldVersion == 0) {
|
||||
if (BuildConfig.INCLUDE_UPDATER && preferences.automaticUpdates()) {
|
||||
if (BuildConfig.INCLUDE_UPDATER) {
|
||||
UpdaterJob.setupTask()
|
||||
}
|
||||
ExtensionUpdateJob.setupTask()
|
||||
@ -43,7 +43,7 @@ object Migrations {
|
||||
|
||||
if (oldVersion < 14) {
|
||||
// Restore jobs after upgrading to evernote's job scheduler.
|
||||
if (BuildConfig.INCLUDE_UPDATER && preferences.automaticUpdates()) {
|
||||
if (BuildConfig.INCLUDE_UPDATER) {
|
||||
UpdaterJob.setupTask()
|
||||
}
|
||||
LibraryUpdateJob.setupTask()
|
||||
@ -80,7 +80,7 @@ object Migrations {
|
||||
if (oldVersion < 62) {
|
||||
LibraryPresenter.updateDB()
|
||||
// Restore jobs after migrating from Evernote's job scheduler to WorkManager.
|
||||
if (BuildConfig.INCLUDE_UPDATER && preferences.automaticUpdates()) {
|
||||
if (BuildConfig.INCLUDE_UPDATER) {
|
||||
UpdaterJob.setupTask()
|
||||
}
|
||||
LibraryUpdateJob.setupTask()
|
||||
@ -115,6 +115,12 @@ object Migrations {
|
||||
// Reset rotation to Free after replacing Lock
|
||||
preferences.rotation().set(1)
|
||||
}
|
||||
if (oldVersion < 74) {
|
||||
// Turn on auto updates for all users
|
||||
if (BuildConfig.INCLUDE_UPDATER) {
|
||||
UpdaterJob.setupTask()
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
@ -140,8 +140,6 @@ object PreferenceKeys {
|
||||
|
||||
const val librarySortingMode = "library_sorting_mode"
|
||||
|
||||
const val automaticUpdates = "automatic_updates"
|
||||
|
||||
const val automaticExtUpdates = "automatic_ext_updates"
|
||||
|
||||
const val autoHideHopper = "autohide_hopper"
|
||||
|
@ -280,8 +280,6 @@ class PreferencesHelper(val context: Context) {
|
||||
|
||||
fun librarySortingAscending() = rxPrefs.getBoolean("library_sorting_ascending", true)
|
||||
|
||||
fun automaticUpdates() = prefs.getBoolean(Keys.automaticUpdates, true)
|
||||
|
||||
fun automaticExtUpdates() = rxPrefs.getBoolean(Keys.automaticExtUpdates, true)
|
||||
|
||||
fun collapsedCategories() = rxPrefs.getStringSet("collapsed_categories", mutableSetOf())
|
||||
|
@ -7,7 +7,6 @@ import androidx.preference.PreferenceScreen
|
||||
import eu.kanade.tachiyomi.BuildConfig
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.preference.asImmediateFlow
|
||||
import eu.kanade.tachiyomi.data.updater.UpdaterJob
|
||||
import eu.kanade.tachiyomi.util.system.LocaleHelper
|
||||
import eu.kanade.tachiyomi.util.system.appDelegateNightMode
|
||||
import eu.kanade.tachiyomi.util.system.getPrefTheme
|
||||
@ -84,27 +83,6 @@ class SettingsGeneralController : SettingsController() {
|
||||
defaultValue = true
|
||||
}
|
||||
|
||||
switchPreference {
|
||||
key = Keys.automaticUpdates
|
||||
titleRes = R.string.check_for_updates
|
||||
summaryRes = R.string.auto_check_for_app_versions
|
||||
defaultValue = true
|
||||
|
||||
if (isUpdaterEnabled) {
|
||||
onChange { newValue ->
|
||||
val checked = newValue as Boolean
|
||||
if (checked) {
|
||||
UpdaterJob.setupTask()
|
||||
} else {
|
||||
UpdaterJob.cancelTask()
|
||||
}
|
||||
true
|
||||
}
|
||||
} else {
|
||||
isVisible = false
|
||||
}
|
||||
}
|
||||
|
||||
preferenceCategory {
|
||||
titleRes = R.string.display
|
||||
|
||||
|
@ -608,7 +608,6 @@
|
||||
<string name="date_format">Date format</string>
|
||||
<string name="check_for_updates">Check for updates</string>
|
||||
<string name="updated_to_">Updated to v%1$s</string>
|
||||
<string name="auto_check_for_app_versions">Automatically check for new app versions</string>
|
||||
<string name="secure_screen">Secure screen</string>
|
||||
<string name="hide_bottom_nav">Auto-hide bottom navigation</string>
|
||||
<string name="app_shortcuts">App shortcuts</string>
|
||||
|
Loading…
Reference in New Issue
Block a user