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 {
for (i in categoryNameList.indices) {
add(
CategoryItem( CategoryItem(
categoryNameList[i], name = name,
categoryDescriptionList[i], description = categoryDescriptionList.getOrNull(index),
categoryThumbnailList[i], thumbnail = categoryThumbnailList.getOrNull(index),
false isSelected = false
) )
)
}
}
} }
/** /**