浏览代码

Add link to Don't Kill My App! in advanced settings

arkon 3 年之前
父节点
当前提交
5d1134dfa8

+ 0 - 1
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

+ 11 - 0
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
 

+ 1 - 0
app/src/main/res/values/strings.xml

@@ -448,6 +448,7 @@
     <string name="crash_log_saved">Crash logs saved</string>
     <string name="pref_disable_battery_optimization">Disable battery optimization</string>
     <string name="pref_disable_battery_optimization_summary">Helps with background library updates and backups</string>
+    <string name="about_dont_kill_my_app">Some manufacturers have additional app restrictions that kill background services. This website has more info on how to fix it.</string>
     <string name="battery_optimization_disabled">Battery optimization is already disabled</string>
     <string name="battery_optimization_setting_activity_not_found">Couldn\'t open device settings</string>