mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-14 04:15:09 +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))
|
flags = cursor.getInt(cursor.getColumnIndex(COL_FLAGS))
|
||||||
|
|
||||||
val orderString = cursor.getString(cursor.getColumnIndex(COL_MANGA_ORDER))
|
val orderString = cursor.getString(cursor.getColumnIndex(COL_MANGA_ORDER))
|
||||||
if (orderString?.firstOrNull()?.isLetter() == true) {
|
when {
|
||||||
mangaSort = orderString.first()
|
orderString.isNullOrBlank() -> {
|
||||||
mangaOrder = emptyList()
|
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.
|
// Insert into database.
|
||||||
|
|
||||||
|
cat.mangaSort = 'a'
|
||||||
db.insertCategory(cat).executeAsBlocking()
|
db.insertCategory(cat).executeAsBlocking()
|
||||||
val cats = db.getCategories().executeAsBlocking()
|
val cats = db.getCategories().executeAsBlocking()
|
||||||
val newCat = cats.find { it.name == name } ?: return false
|
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
|
R.string.system_theme, R.string.sysyem_white_theme, R.string.system_amoled_theme, R.string
|
||||||
.system_darkblue_theme)
|
.system_darkblue_theme)
|
||||||
entryValues = listOf(1, 8, 2, 3, 4, 5, 9, 6, 7)
|
entryValues = listOf(1, 8, 2, 3, 4, 5, 9, 6, 7)
|
||||||
defaultValue = 8
|
defaultValue = 9
|
||||||
|
|
||||||
onChange {
|
onChange {
|
||||||
activity?.recreate()
|
activity?.recreate()
|
||||||
|
Loading…
Reference in New Issue
Block a user