mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-28 21:33:53 +01:00
Store P18 instead of processed image url in DepictedItem
This commit is contained in:
parent
d4a9bacd91
commit
0fad413202
1 changed files with 5 additions and 4 deletions
|
|
@ -29,7 +29,7 @@ const val THUMB_IMAGE_SIZE = "70px"
|
|||
data class DepictedItem constructor(
|
||||
override val name: String,
|
||||
val description: String?,
|
||||
val imageUrl: String?,
|
||||
val primaryImage: String?,
|
||||
val instanceOfs: List<String>,
|
||||
val commonsCategories: List<CategoryItem>,
|
||||
var isSelected: Boolean,
|
||||
|
|
@ -51,9 +51,7 @@ data class DepictedItem constructor(
|
|||
constructor(entity: Entities.Entity, name: String, description: String) : this(
|
||||
name,
|
||||
description,
|
||||
entity[IMAGE].primaryImageValue?.let {
|
||||
getImageUrl(it.value, THUMB_IMAGE_SIZE)
|
||||
},
|
||||
entity[IMAGE].primaryImageValue?.value,
|
||||
entity[INSTANCE_OF].toIds(),
|
||||
entity[COMMONS_CATEGORY]?.map {
|
||||
CategoryItem(
|
||||
|
|
@ -68,6 +66,9 @@ data class DepictedItem constructor(
|
|||
entity.id(),
|
||||
)
|
||||
|
||||
val imageUrl: String?
|
||||
get() = primaryImage?.let { getImageUrl(it, THUMB_IMAGE_SIZE) }
|
||||
|
||||
override fun equals(other: Any?) =
|
||||
when {
|
||||
this === other -> true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue