From dce30494467429a0c578386508f1c253fc6d7799 Mon Sep 17 00:00:00 2001 From: arkon Date: Sun, 18 Jul 2021 15:00:07 -0400 Subject: [PATCH] Remove autoAddTrack preference --- .../eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt | 2 -- .../kanade/tachiyomi/data/preference/PreferencesHelper.kt | 2 -- .../ui/browse/source/browse/BrowseSourcePresenter.kt | 4 +--- .../java/eu/kanade/tachiyomi/ui/manga/MangaController.kt | 2 +- .../tachiyomi/ui/setting/SettingsTrackingController.kt | 6 ------ app/src/main/res/values/strings.xml | 3 +-- 6 files changed, 3 insertions(+), 16 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt index 725e137b4..4e56cb371 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceKeys.kt @@ -99,8 +99,6 @@ object PreferenceKeys { const val autoUpdateTrack = "pref_auto_update_manga_sync_key" - const val autoAddTrack = "pref_auto_add_track_key" - const val lastUsedSource = "last_catalogue_source" const val lastUsedCategory = "last_used_category" 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 21012a143..bfa5a1e94 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 @@ -177,8 +177,6 @@ class PreferencesHelper(val context: Context) { fun autoUpdateTrack() = prefs.getBoolean(Keys.autoUpdateTrack, true) - fun autoAddTrack() = prefs.getBoolean(Keys.autoAddTrack, true) - fun lastUsedSource() = flowPrefs.getLong(Keys.lastUsedSource, -1) fun lastUsedCategory() = flowPrefs.getInt(Keys.lastUsedCategory, 0) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourcePresenter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourcePresenter.kt index 10ffa8946..7b095036c 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourcePresenter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourcePresenter.kt @@ -267,9 +267,7 @@ open class BrowseSourcePresenter( } else { ChapterSettingsHelper.applySettingDefaults(manga) - if (prefs.autoAddTrack()) { - autoAddTrack(manga) - } + autoAddTrack(manga) } db.insertManga(manga).executeAsBlocking() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt index d63d5e70b..d0468d009 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaController.kt @@ -540,7 +540,7 @@ class MangaController : } } - if (source != null && preferences.autoAddTrack()) { + if (source != null) { presenter.trackList .map { it.service } .filterIsInstance() diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsTrackingController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsTrackingController.kt index f6dc9e775..1305dab49 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsTrackingController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsTrackingController.kt @@ -76,12 +76,6 @@ class SettingsTrackingController : preferenceCategory { titleRes = R.string.enhanced_services - switchPreference { - key = Keys.autoAddTrack - titleRes = R.string.pref_auto_add_track - defaultValue = true - } - trackPreference(trackManager.komga) { val acceptedSources = trackManager.komga.getAcceptedSources() val hasValidSourceInstalled = sourceManager.getCatalogueSources() diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ed7594191..d82693e09 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -385,8 +385,7 @@ Services One-way sync to update the chapter progress in tracking services. Set up tracking for individual manga entries from their tracking button. Enhanced services - Automatically track manga when added to library - Services that provide enhanced features for specific sources. + Services that provide enhanced features for specific sources. Manga are automatically tracked when added to your library. Check for extension updates