more tracepot crash fixes

This commit is contained in:
Jay 2020-05-25 14:20:53 -04:00
parent 11598362b8
commit d7335bdc2f
2 changed files with 3 additions and 3 deletions

View File

@ -724,8 +724,8 @@ class LibraryController(
if (justStarted && freshStart) {
scrollToHeader(activeCategory)
}
recycler.post {
elevateAppBar(recycler.canScrollVertically(-1))
recycler?.post {
elevateAppBar(recycler?.canScrollVertically(-1) == true)
setActiveCategory()
}

View File

@ -158,7 +158,7 @@ class LibraryPresenter(
private suspend fun sectionLibrary(items: List<LibraryItem>, freshStart: Boolean = false) {
libraryItems = items
val showAll = showAllCategories || !libraryIsGrouped ||
categories.size == 1
categories.size <= 1
if (!showAll) {
sectionedLibraryItems = items.groupBy { it.header.category.id ?: 0 }.toMutableMap()
if (currentCategory == -1) currentCategory = categories.find {