mirror of
https://github.com/aniyomiorg/aniyomi.git
synced 2024-11-24 13:48:55 +03:00
Add shortcut to tracking guide on website
This commit is contained in:
parent
71d225c562
commit
a1e31549a2
4 changed files with 30 additions and 4 deletions
|
@ -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/"
|
||||
|
|
|
@ -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/"
|
||||
|
|
11
app/src/main/res/menu/settings_tracking.xml
Normal file
11
app/src/main/res/menu/settings_tracking.xml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<menu xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/action_tracking_help"
|
||||
android:icon="@drawable/ic_help_24dp"
|
||||
android:title="@string/tracking_guide"
|
||||
app:iconTint="?attr/colorOnPrimary"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
|
@ -378,6 +378,7 @@
|
|||
<string name="pref_download_new_categories_details">Manga in excluded categories will not be downloaded even if they are also in included categories.</string>
|
||||
|
||||
<!-- Tracking section -->
|
||||
<string name="tracking_guide">Tracking guide</string>
|
||||
<string name="pref_auto_update_manga_sync">Update chapter progress after reading</string>
|
||||
<string name="pref_auto_add_track">Track silently when adding manga to library</string>
|
||||
<string name="services">Services</string>
|
||||
|
|
Loading…
Reference in a new issue