diff --git a/app/build.gradle b/app/build.gradle
index 2d201e1355..df3fcf40b5 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -58,7 +58,7 @@ android {
buildTypes {
debug {
versionNameSuffix "-${getCommitCount()}"
- applicationIdSuffix ".debugJ2K"
+ applicationIdSuffix ".debug"
}
release {
applicationIdSuffix = '.j2k'
diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt
index 5c75318a1a..3e3758cefe 100644
--- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt
+++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt
@@ -40,12 +40,10 @@ import eu.kanade.tachiyomi.data.preference.getOrDefault
import eu.kanade.tachiyomi.ui.base.controller.BaseController
import eu.kanade.tachiyomi.ui.base.controller.TabbedController
import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction
-import eu.kanade.tachiyomi.ui.category.CategoryController
import eu.kanade.tachiyomi.ui.download.DownloadController
import eu.kanade.tachiyomi.ui.library.filter.SortFilterBottomSheet
import eu.kanade.tachiyomi.ui.main.MainActivity
import eu.kanade.tachiyomi.ui.manga.MangaController
-import eu.kanade.tachiyomi.ui.migration.MigrationController
import eu.kanade.tachiyomi.ui.migration.MigrationInterface
import eu.kanade.tachiyomi.ui.migration.manga.design.PreMigrationController
import eu.kanade.tachiyomi.ui.migration.manga.process.MigrationListController
@@ -520,12 +518,6 @@ open class LibraryController(
bottom_sheet.sheetBehavior?.state = BottomSheetBehavior.STATE_COLLAPSED
else bottom_sheet.sheetBehavior?.state = BottomSheetBehavior.STATE_EXPANDED
}
- R.id.action_edit_categories -> {
- router.pushController(CategoryController().withFadeTransaction())
- }
- R.id.action_source_migration -> {
- router.pushController(MigrationController().withFadeTransaction())
- }
else -> return super.onOptionsItemSelected(item)
}
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 8d2a13a14d..e8cc87e73f 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
@@ -14,6 +14,8 @@ import eu.kanade.tachiyomi.data.library.LibraryUpdateJob
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
import eu.kanade.tachiyomi.data.preference.getOrDefault
import eu.kanade.tachiyomi.ui.base.controller.DialogController
+import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction
+import eu.kanade.tachiyomi.ui.category.CategoryController
import kotlinx.android.synthetic.main.pref_library_columns.view.*
import rx.Observable
import uy.kohesive.injekt.Injekt
@@ -70,6 +72,47 @@ class SettingsLibraryController : SettingsController() {
val dbCategories = db.getCategories().executeAsBlocking()
+ preferenceCategory {
+ titleRes = R.string.pref_category_library_categories
+ preference {
+ titleRes = R.string.action_edit_categories
+ onClick { router.pushController(CategoryController().withFadeTransaction()) }
+ }
+ intListPreference(activity) {
+ key = Keys.defaultCategory
+ titleRes = R.string.default_category
+
+ val categories = listOf(Category.createDefault(context)) + dbCategories
+ entries =
+ listOf(context.getString(R.string.default_category_summary)) + categories.map { it.name }.toTypedArray()
+ entryValues = listOf(-1) + categories.mapNotNull { it.id }.toList()
+ defaultValue = "-1"
+
+ val selectedCategory = categories.find { it.id == preferences.defaultCategory() }
+ summary =
+ selectedCategory?.name ?: context.getString(R.string.default_category_summary)
+ onChange { newValue ->
+ summary = categories.find {
+ it.id == newValue as Int
+ }?.name ?: context.getString(R.string.default_category_summary)
+ true
+ }
+ }
+ intListPreference(activity) {
+ titleRes = R.string.pref_keep_category_sorting
+ key = Keys.keepCatSort
+
+ customSummary = context.getString(R.string.pref_keep_category_sorting_summary)
+ entries = listOf(
+ context.getString(R.string.always_ask),
+ context.getString(R.string.option_keep_category_sort),
+ context.getString(R.string.option_switch_to_dnd)
+ )
+ entryRange = 0..2
+ defaultValue = 0
+ }
+ }
+
preferenceCategory {
titleRes = R.string.pref_category_library_update
intListPreference(activity) {
@@ -160,42 +203,6 @@ class SettingsLibraryController : SettingsController() {
}
}
}
- preferenceCategory {
- titleRes = R.string.pref_category_library_categories
- intListPreference(activity) {
- key = Keys.defaultCategory
- titleRes = R.string.default_category
-
- val categories = listOf(Category.createDefault(context)) + dbCategories
- entries =
- listOf(context.getString(R.string.default_category_summary)) + categories.map { it.name }.toTypedArray()
- entryValues = listOf(-1) + categories.mapNotNull { it.id }.toList()
- defaultValue = "-1"
-
- val selectedCategory = categories.find { it.id == preferences.defaultCategory() }
- summary =
- selectedCategory?.name ?: context.getString(R.string.default_category_summary)
- onChange { newValue ->
- summary = categories.find {
- it.id == newValue as Int
- }?.name ?: context.getString(R.string.default_category_summary)
- true
- }
- }
- intListPreference(activity) {
- titleRes = R.string.pref_keep_category_sorting
- key = Keys.keepCatSort
-
- customSummary = context.getString(R.string.pref_keep_category_sorting_summary)
- entries = listOf(
- context.getString(R.string.always_ask),
- context.getString(R.string.option_keep_category_sort),
- context.getString(R.string.option_switch_to_dnd)
- )
- entryRange = 0..2
- defaultValue = 0
- }
- }
if (preferences.skipPreMigration().getOrDefault() || preferences.migrationSources().getOrDefault().isNotEmpty()) {
preferenceCategory {
titleRes = R.string.pref_category_library_migration
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 20ccb8ccca..ce770e6c77 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
@@ -9,6 +9,7 @@ import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.ui.base.controller.withFadeTransaction
import eu.kanade.tachiyomi.ui.extension.ExtensionController
+import eu.kanade.tachiyomi.ui.migration.MigrationController
import eu.kanade.tachiyomi.util.system.getResourceColor
import eu.kanade.tachiyomi.util.system.openInBrowser
@@ -60,6 +61,12 @@ class SettingsMainController : SettingsController() {
titleRes = R.string.pref_category_tracking
onClick { navigateTo(SettingsTrackingController()) }
}
+ preference {
+ iconRes = R.drawable.ic_swap_calls_white_24dp
+ iconTint = tintColor
+ titleRes = R.string.label_migration
+ onClick { navigateTo(MigrationController()) }
+ }
preference {
iconRes = R.drawable.ic_backup_black_24dp
iconTint = tintColor
diff --git a/app/src/main/res/menu/library.xml b/app/src/main/res/menu/library.xml
index f3a27a859d..0c66dae895 100644
--- a/app/src/main/res/menu/library.xml
+++ b/app/src/main/res/menu/library.xml
@@ -17,16 +17,4 @@
android:title="@string/action_filter"
app:showAsAction="ifRoom"/>
-
-
-
-