diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt
index 62cc5f61b..6961ff770 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt
@@ -23,7 +23,6 @@ import eu.kanade.tachiyomi.ui.manga.MangaController
import eu.kanade.tachiyomi.ui.recent_updates.RecentChaptersController
import eu.kanade.tachiyomi.ui.recently_read.RecentlyReadController
import eu.kanade.tachiyomi.ui.setting.SettingsMainController
-import eu.kanade.tachiyomi.util.system.openInBrowser
import kotlinx.android.synthetic.main.main_activity.*
@@ -82,9 +81,6 @@ class MainActivity : BaseActivity() {
R.id.nav_drawer_settings -> {
router.pushController(SettingsMainController().withFadeTransaction())
}
- R.id.nav_drawer_help -> {
- openInBrowser(URL_HELP)
- }
}
}
drawer.closeDrawer(GravityCompat.START)
@@ -265,8 +261,6 @@ class MainActivity : BaseActivity() {
const val INTENT_SEARCH = "eu.kanade.tachiyomi.SEARCH"
const val INTENT_SEARCH_QUERY = "query"
const val INTENT_SEARCH_FILTER = "filter"
-
- private const val URL_HELP = "https://tachiyomi.org/help/"
}
}
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/BaseSettingsController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/BaseSettingsController.kt
new file mode 100644
index 000000000..902952f86
--- /dev/null
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/BaseSettingsController.kt
@@ -0,0 +1,30 @@
+package eu.kanade.tachiyomi.ui.setting
+
+import android.view.Menu
+import android.view.MenuInflater
+import android.view.MenuItem
+import eu.kanade.tachiyomi.R
+import eu.kanade.tachiyomi.util.system.openInBrowser
+
+abstract class BaseSettingsController : SettingsController() {
+
+ init {
+ setHasOptionsMenu(true)
+ }
+
+ override fun onCreateOptionsMenu(menu: Menu, inflater: MenuInflater) {
+ inflater.inflate(R.menu.settings, menu)
+ }
+
+ override fun onOptionsItemSelected(item: MenuItem): Boolean {
+ when (item.itemId) {
+ R.id.action_help -> activity?.openInBrowser(URL_HELP)
+ }
+
+ return super.onOptionsItemSelected(item)
+ }
+
+ companion object {
+ private const val URL_HELP = "https://tachiyomi.org/help/"
+ }
+}
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAboutController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAboutController.kt
index 0200adf39..c14a48b39 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAboutController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAboutController.kt
@@ -31,7 +31,7 @@ import java.util.Locale
import java.util.TimeZone
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
-class SettingsAboutController : SettingsController() {
+class SettingsAboutController : BaseSettingsController() {
/**
* Checks for new releases
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 c4a23f582..16d5a76e9 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
@@ -21,7 +21,7 @@ import rx.android.schedulers.AndroidSchedulers
import rx.schedulers.Schedulers
import uy.kohesive.injekt.injectLazy
-class SettingsAdvancedController : SettingsController() {
+class SettingsAdvancedController : BaseSettingsController() {
private val network: NetworkHelper by injectLazy()
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt
index 9ebf3339c..477b4018e 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt
@@ -29,7 +29,7 @@ import java.io.File
import java.util.concurrent.TimeUnit
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
-class SettingsBackupController : SettingsController() {
+class SettingsBackupController : BaseSettingsController() {
/**
* Flags containing information of what to backup.
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDownloadController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDownloadController.kt
index 4c7e87926..6cc1451c3 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDownloadController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsDownloadController.kt
@@ -23,7 +23,7 @@ import uy.kohesive.injekt.injectLazy
import java.io.File
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
-class SettingsDownloadController : SettingsController() {
+class SettingsDownloadController : BaseSettingsController() {
private val db: DatabaseHelper by injectLazy()
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt
index 2d589cd4e..30ffe58e7 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt
@@ -5,7 +5,7 @@ import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.util.system.LocaleHelper
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
-class SettingsGeneralController : SettingsController() {
+class SettingsGeneralController : BaseSettingsController() {
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
titleRes = R.string.pref_category_general
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt
index 9efc5b6b0..d27605748 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsLibraryController.kt
@@ -22,7 +22,7 @@ import uy.kohesive.injekt.Injekt
import uy.kohesive.injekt.api.get
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
-class SettingsLibraryController : SettingsController() {
+class SettingsLibraryController : BaseSettingsController() {
private val db: DatabaseHelper = Injekt.get()
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt
index eb642f324..1770dcfb1 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsMainController.kt
@@ -1,11 +1,12 @@
package eu.kanade.tachiyomi.ui.setting
import androidx.preference.PreferenceScreen
+import com.bluelinelabs.conductor.RouterTransaction
import eu.kanade.tachiyomi.R
-import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction
import eu.kanade.tachiyomi.util.system.getResourceColor
-class SettingsMainController : SettingsController() {
+class SettingsMainController : BaseSettingsController() {
+
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
titleRes = R.string.label_settings
@@ -54,7 +55,7 @@ class SettingsMainController : SettingsController() {
onClick { navigateTo(SettingsAdvancedController()) }
}
preference {
- iconRes = R.drawable.ic_help_black_24dp
+ iconRes = R.drawable.ic_info_black_24dp
iconTint = tintColor
titleRes = R.string.pref_category_about
onClick { navigateTo(SettingsAboutController()) }
@@ -62,6 +63,6 @@ class SettingsMainController : SettingsController() {
}
private fun navigateTo(controller: SettingsController) {
- router.pushController(controller.withFadeTransaction())
+ router.pushController(RouterTransaction.with(controller))
}
}
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt
index f6371c4af..f6b82d258 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsReaderController.kt
@@ -5,7 +5,7 @@ import androidx.preference.PreferenceScreen
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
-class SettingsReaderController : SettingsController() {
+class SettingsReaderController : BaseSettingsController() {
override fun setupPreferenceScreen(screen: PreferenceScreen) = with(screen) {
titleRes = R.string.pref_category_reader
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 08a1bd79b..b2c38c0b6 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
@@ -17,7 +17,7 @@ import eu.kanade.tachiyomi.widget.preference.TrackLogoutDialog
import uy.kohesive.injekt.injectLazy
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
-class SettingsTrackingController : SettingsController(),
+class SettingsTrackingController : BaseSettingsController(),
TrackLoginDialog.Listener,
TrackLogoutDialog.Listener {
diff --git a/app/src/main/res/drawable/ic_help_black_24dp.xml b/app/src/main/res/drawable/ic_help_white_24dp.xml
similarity index 67%
rename from app/src/main/res/drawable/ic_help_black_24dp.xml
rename to app/src/main/res/drawable/ic_help_white_24dp.xml
index 1517747d0..04c1c00fc 100644
--- a/app/src/main/res/drawable/ic_help_black_24dp.xml
+++ b/app/src/main/res/drawable/ic_help_white_24dp.xml
@@ -1,9 +1,9 @@