JDK8, lint fixing (#2888)

* Use Kotlin JDK8

* Satisfy a ton of lints

* Run res/layout files (and manifest) through reformatter
This commit is contained in:
TacoTheDank
2020-04-18 14:47:22 -04:00
committed by GitHub
parent 4fc8800a37
commit 415df2357c
75 changed files with 224 additions and 229 deletions
@@ -229,13 +229,13 @@ class LibraryCategoryView @JvmOverloads constructor(context: Context, attrs: Att
override fun onItemClick(view: View?, position: Int): Boolean {
// If the action mode is created and the position is valid, toggle the selection.
val item = adapter.getItem(position) ?: return false
if (adapter.mode == SelectableAdapter.Mode.MULTI) {
return if (adapter.mode == SelectableAdapter.Mode.MULTI) {
lastClickPosition = position
toggleSelection(position)
return true
true
} else {
openManga(item.manga)
return false
false
}
}
@@ -303,7 +303,7 @@ class LibraryPresenter(
if (mangas.isEmpty()) return emptyList()
return mangas.toSet()
.map { db.getCategoriesForManga(it).executeAsBlocking() }
.reduce { set1: Iterable<Category>, set2 -> set1.intersect(set2) }
.reduce { set1: Iterable<Category>, set2 -> set1.intersect(set2).toMutableList() }
}
/**