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