From 5d1134dfa8918d045504f393a0286c78b6e91556 Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 17 Jul 2021 12:52:27 -0400 Subject: [PATCH] Add link to Don't Kill My App! in advanced settings --- .../eu/kanade/tachiyomi/data/track/anilist/Anilist.kt | 1 - .../ui/setting/SettingsAdvancedController.kt | 11 +++++++++++ app/src/main/res/values/strings.xml | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt index efd7668559..5bf89720ec 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/anilist/Anilist.kt @@ -146,7 +146,6 @@ class Anilist(private val context: Context, id: Int) : TrackService(id) { track.library_id = libManga.library_id } - if (track.status != COMPLETED) { if (track.status != REPEATING && didReadChapter) { track.status = READING diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt index 0b0d8c9cac..f2bce17c2f 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt @@ -19,6 +19,7 @@ import eu.kanade.tachiyomi.network.NetworkHelper import eu.kanade.tachiyomi.network.PREF_DOH_CLOUDFLARE import eu.kanade.tachiyomi.network.PREF_DOH_GOOGLE import eu.kanade.tachiyomi.ui.base.controller.DialogController +import eu.kanade.tachiyomi.ui.base.controller.openInBrowser import eu.kanade.tachiyomi.util.CrashLogUtil import eu.kanade.tachiyomi.util.lang.launchIO import eu.kanade.tachiyomi.util.lang.withUIContext @@ -89,6 +90,16 @@ class SettingsAdvancedController : SettingsController() { } } + preference { + key = "pref_dont_kill_my_app" + title = "Don't kill my app!" + summaryRes = R.string.about_dont_kill_my_app + + onClick { + openInBrowser("https://dontkillmyapp.com/") + } + } + preferenceCategory { titleRes = R.string.label_data diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 543a472d99..db3de167eb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -448,6 +448,7 @@ Crash logs saved Disable battery optimization Helps with background library updates and backups + Some manufacturers have additional app restrictions that kill background services. This website has more info on how to fix it. Battery optimization is already disabled Couldn\'t open device settings