diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrationSourcesController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrationSourcesController.kt index 08683c597..d8124724e 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrationSourcesController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/MigrationSourcesController.kt @@ -72,8 +72,6 @@ class MigrationSourcesController : parentController!!.router.pushController(controller.withFadeTransaction()) return false } - - companion object { - const val HELP_URL = "https://tachiyomi.org/help/guides/source-migration/" - } } + +private const val HELP_URL = "https://tachiyomi.org/help/guides/source-migration/" 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 20263fe71..dbf72ef6e 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 @@ -1,6 +1,9 @@ package eu.kanade.tachiyomi.ui.setting import android.app.Activity +import android.view.Menu +import android.view.MenuInflater +import android.view.MenuItem import androidx.preference.PreferenceScreen import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.data.track.NoLoginTrackService @@ -112,6 +115,17 @@ class SettingsTrackingController : updatePreference(trackManager.bangumi.id) } + override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) { + inflater.inflate(R.menu.settings_tracking, menu) + } + + override fun onOptionsItemSelected(item: MenuItem): Boolean { + when (item.itemId) { + R.id.action_tracking_help -> activity?.openInBrowser(HELP_URL) + } + return super.onOptionsItemSelected(item) + } + private fun updatePreference(id: Int) { val pref = findPreference(Keys.trackUsername(id)) as? LoginPreference pref?.notifyChanged() @@ -125,3 +139,5 @@ class SettingsTrackingController : updatePreference(service.id) } } + +private const val HELP_URL = "https://tachiyomi.org/help/guides/tracking/" diff --git a/app/src/main/res/menu/settings_tracking.xml b/app/src/main/res/menu/settings_tracking.xml new file mode 100644 index 000000000..cdab60207 --- /dev/null +++ b/app/src/main/res/menu/settings_tracking.xml @@ -0,0 +1,11 @@ +
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 20946c789..6087f93e6 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -378,6 +378,7 @@