From 23b95955dc09fc6d00dfdde160b47cd5fe0cf771 Mon Sep 17 00:00:00 2001 From: machiav3lli Date: Tue, 11 Oct 2022 02:55:06 +0200 Subject: [PATCH] Add: Developer to ProductItem --- .../fdroid/database/entity/Product.kt | 23 ++++++++++--------- .../machiav3lli/fdroid/entity/ProductItem.kt | 1 + 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/main/kotlin/com/machiav3lli/fdroid/database/entity/Product.kt b/src/main/kotlin/com/machiav3lli/fdroid/database/entity/Product.kt index 5a683a3d..83d8b88b 100644 --- a/src/main/kotlin/com/machiav3lli/fdroid/database/entity/Product.kt +++ b/src/main/kotlin/com/machiav3lli/fdroid/database/entity/Product.kt @@ -106,17 +106,18 @@ open class Product( fun toItem(installed: Installed? = null): ProductItem = ProductItem( - repositoryId, - packageName, - label, - summary, - icon, - metadataIcon, - version, - "", - compatible, - canUpdate(installed), - 0 + repositoryId = repositoryId, + packageName = packageName, + name = label, + developer = author.name, + summary = summary, + icon = icon, + metadataIcon = metadataIcon, + version = version, + installedVersion = "", + compatible = compatible, + canUpdate = canUpdate(installed), + matchRank = 0 ) fun canUpdate(installed: Installed?): Boolean = diff --git a/src/main/kotlin/com/machiav3lli/fdroid/entity/ProductItem.kt b/src/main/kotlin/com/machiav3lli/fdroid/entity/ProductItem.kt index 6638fd18..ac9a0ed1 100644 --- a/src/main/kotlin/com/machiav3lli/fdroid/entity/ProductItem.kt +++ b/src/main/kotlin/com/machiav3lli/fdroid/entity/ProductItem.kt @@ -4,6 +4,7 @@ data class ProductItem( var repositoryId: Long = 0, var packageName: String = "com.machaiv3lli.fdroid", var name: String = "Droid-ify", + val developer: String = "", var summary: String = "A great F-Droid client", val icon: String = "", val metadataIcon: String = "",