Fix crash for bookmarks without descriptions/thumbnails (#6488)
Some checks are pending
Android CI / Run tests and generate APK (push) Waiting to run

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
This commit is contained in:
Dmitriy 2025-10-16 14:56:41 +04:00 committed by GitHub
parent 7a865df909
commit 7d96e94689
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -173,19 +173,13 @@ class BookmarkItemsDao @Inject constructor(
categoryNameList: List<String>, categoryNameList: List<String>,
categoryDescriptionList: List<String>, categoryDescriptionList: List<String>,
categoryThumbnailList: List<String> categoryThumbnailList: List<String>
): List<CategoryItem> { ): List<CategoryItem> = categoryNameList.mapIndexed { index, name ->
return buildList { CategoryItem(
for (i in categoryNameList.indices) { name = name,
add( description = categoryDescriptionList.getOrNull(index),
CategoryItem( thumbnail = categoryThumbnailList.getOrNull(index),
categoryNameList[i], isSelected = false
categoryDescriptionList[i], )
categoryThumbnailList[i],
false
)
)
}
}
} }
/** /**