Few more tracepot crashes
This commit is contained in:
parent
3ad9d84b5f
commit
fdd4b08a49
3 changed files with 4 additions and 3 deletions
|
@ -6,8 +6,6 @@ class LibraryManga : MangaImpl() {
|
|||
|
||||
var category: Int = 0
|
||||
|
||||
fun isBlank() = id == Long.MIN_VALUE
|
||||
|
||||
companion object {
|
||||
fun createBlank(categoryId: Int): LibraryManga = LibraryManga().apply {
|
||||
title = ""
|
||||
|
|
|
@ -27,6 +27,8 @@ interface Manga : SManga {
|
|||
|
||||
var hide_title: Boolean
|
||||
|
||||
fun isBlank() = id == Long.MIN_VALUE
|
||||
|
||||
fun setChapterOrder(order: Int) {
|
||||
setFlags(order, SORT_MASK)
|
||||
setFlags(SORT_LOCAL, SORT_SELF_MASK)
|
||||
|
|
|
@ -289,7 +289,7 @@ class LibraryController(
|
|||
if (libraryLayout == 0) return 1
|
||||
val item = this@LibraryController.adapter.getItem(position)
|
||||
return if (item is LibraryHeaderItem || item is SearchGlobalItem || (item is LibraryItem && item.manga.isBlank())) {
|
||||
recycler.manager.spanCount
|
||||
recycler?.manager?.spanCount ?: 1
|
||||
} else {
|
||||
1
|
||||
}
|
||||
|
@ -829,6 +829,7 @@ class LibraryController(
|
|||
}
|
||||
|
||||
private fun setSelection(manga: Manga, selected: Boolean) {
|
||||
if (manga.isBlank()) return
|
||||
val currentMode = adapter.mode
|
||||
if (selected) {
|
||||
if (selectedMangas.add(manga)) {
|
||||
|
|
Reference in a new issue