From 2aad4ebc631a62e3315588bec412d7ee2e747b0e Mon Sep 17 00:00:00 2001 From: Mariotaku Lee Date: Sat, 26 May 2018 01:37:23 +0800 Subject: [PATCH] fixed summary card thumbnail size --- .../mariotaku/twidere/extension/model/api/StatusExtensions.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/twidere/src/main/kotlin/org/mariotaku/twidere/extension/model/api/StatusExtensions.kt b/twidere/src/main/kotlin/org/mariotaku/twidere/extension/model/api/StatusExtensions.kt index 5f8b30e4c..aa655d0b7 100644 --- a/twidere/src/main/kotlin/org/mariotaku/twidere/extension/model/api/StatusExtensions.kt +++ b/twidere/src/main/kotlin/org/mariotaku/twidere/extension/model/api/StatusExtensions.kt @@ -335,7 +335,7 @@ private fun CardEntity.toSummaryCard(thumbnailSize: Int): SummaryCard? { return@mapNotNull v as? CardEntity.ImageValue }.sortedBy { Math.min(it.width, it.height) } val bestThumbnail = thumbnails.firstOrNull { - thumbnailSize >= Math.min(it.width, it.height) + Math.min(it.width, it.height) >= thumbnailSize } ?: thumbnails.lastOrNull() obj.thumbnail = bestThumbnail?.url return obj