From 879a9c735c029a0d20b6c63328ec62f729c7ebc8 Mon Sep 17 00:00:00 2001 From: Jay Date: Thu, 30 Apr 2020 19:25:48 -0400 Subject: [PATCH] Daily library updates are now the default for new users --- app/src/main/java/eu/kanade/tachiyomi/Migrations.kt | 1 + .../eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt | 2 +- .../eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/Migrations.kt b/app/src/main/java/eu/kanade/tachiyomi/Migrations.kt index 0877ef7b67..7899070d68 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/Migrations.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/Migrations.kt @@ -29,6 +29,7 @@ object Migrations { UpdaterJob.setupTask() } ExtensionUpdateJob.setupTask() + LibraryUpdateJob.setupTask() return BuildConfig.DEBUG } diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt index 43024c38ac..e16a0dcd67 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt @@ -165,7 +165,7 @@ class PreferencesHelper(val context: Context) { fun removeAfterMarkedAsRead() = prefs.getBoolean(Keys.removeAfterMarkedAsRead, false) - fun libraryUpdateInterval() = rxPrefs.getInteger(Keys.libraryUpdateInterval, 0) + fun libraryUpdateInterval() = rxPrefs.getInteger(Keys.libraryUpdateInterval, 24) fun libraryUpdateRestriction() = prefs.getStringSet(Keys.libraryUpdateRestriction, emptySet()) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt index 9fb3f8e19d..576a19e8e6 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt @@ -77,7 +77,7 @@ class SettingsLibraryController : SettingsController() { R.string.every_2_days ) entryValues = listOf(0, 1, 2, 3, 6, 12, 24, 48) - defaultValue = 0 + defaultValue = 24 onChange { newValue -> // Always cancel the previous task, it seems that sometimes they are not updated.