mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 17:41:50 +01:00
New categories now default to title sorting in D&D/single list mode
This commit is contained in:
parent
4aee7752c4
commit
6cccdf4459
@ -60,12 +60,17 @@ class CategoryGetResolver : DefaultGetResolver<Category>() {
|
||||
flags = cursor.getInt(cursor.getColumnIndex(COL_FLAGS))
|
||||
|
||||
val orderString = cursor.getString(cursor.getColumnIndex(COL_MANGA_ORDER))
|
||||
if (orderString?.firstOrNull()?.isLetter() == true) {
|
||||
mangaSort = orderString.first()
|
||||
mangaOrder = emptyList()
|
||||
when {
|
||||
orderString.isNullOrBlank() -> {
|
||||
mangaSort = 'a'
|
||||
mangaOrder = emptyList()
|
||||
}
|
||||
orderString.firstOrNull()?.isLetter() == true -> {
|
||||
mangaSort = orderString.first()
|
||||
mangaOrder = emptyList()
|
||||
}
|
||||
else -> mangaOrder = orderString.split("/")?.mapNotNull { it.toLongOrNull() }
|
||||
}
|
||||
else
|
||||
mangaOrder = orderString?.split("/")?.mapNotNull { it.toLongOrNull() } ?: emptyList()
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,6 +72,7 @@ class CategoryPresenter(
|
||||
|
||||
// Insert into database.
|
||||
|
||||
cat.mangaSort = 'a'
|
||||
db.insertCategory(cat).executeAsBlocking()
|
||||
val cats = db.getCategories().executeAsBlocking()
|
||||
val newCat = cats.find { it.name == name } ?: return false
|
||||
|
@ -50,7 +50,7 @@ class SettingsGeneralController : SettingsController() {
|
||||
R.string.system_theme, R.string.sysyem_white_theme, R.string.system_amoled_theme, R.string
|
||||
.system_darkblue_theme)
|
||||
entryValues = listOf(1, 8, 2, 3, 4, 5, 9, 6, 7)
|
||||
defaultValue = 8
|
||||
defaultValue = 9
|
||||
|
||||
onChange {
|
||||
activity?.recreate()
|
||||
|
Loading…
Reference in New Issue
Block a user