Fix crash for bookmarks without descriptions/thumbnails

This commit is contained in:
DeKaN 2025-10-12 14:21:07 +04:00
parent 14d6c80241
commit ab8c9edec6
No known key found for this signature in database
GPG key ID: 8133F26EAA20C471

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
) )
)
}
}
} }
/** /**