fixed summary card thumbnail size
This commit is contained in:
parent
d2b3cf7c98
commit
2aad4ebc63
|
@ -335,7 +335,7 @@ private fun CardEntity.toSummaryCard(thumbnailSize: Int): SummaryCard? {
|
||||||
return@mapNotNull v as? CardEntity.ImageValue
|
return@mapNotNull v as? CardEntity.ImageValue
|
||||||
}.sortedBy { Math.min(it.width, it.height) }
|
}.sortedBy { Math.min(it.width, it.height) }
|
||||||
val bestThumbnail = thumbnails.firstOrNull {
|
val bestThumbnail = thumbnails.firstOrNull {
|
||||||
thumbnailSize >= Math.min(it.width, it.height)
|
Math.min(it.width, it.height) >= thumbnailSize
|
||||||
} ?: thumbnails.lastOrNull()
|
} ?: thumbnails.lastOrNull()
|
||||||
obj.thumbnail = bestThumbnail?.url
|
obj.thumbnail = bestThumbnail?.url
|
||||||
return obj
|
return obj
|
||||||
|
|
Loading…
Reference in New Issue