mirror of
https://github.com/f-droid/fdroidclient.git
synced 2026-05-02 12:44:05 -04:00
[db] Expose repoId of category and add method to get localized icon
The repoId is needed, so we can download the category icon from the correct repo.
This commit is contained in:
committed by
Hans-Christoph Steiner
parent
20f8a8b9fb
commit
0b28cced32
@@ -241,6 +241,9 @@ public abstract class RepoAttribute {
|
||||
internal abstract val name: LocalizedTextV2
|
||||
internal abstract val description: LocalizedTextV2
|
||||
|
||||
public fun getIcon(localeList: LocaleListCompat): FileV2? =
|
||||
icon.getBestLocale(localeList)
|
||||
|
||||
public fun getName(localeList: LocaleListCompat): String? =
|
||||
name.getBestLocale(localeList)
|
||||
|
||||
@@ -297,7 +300,7 @@ internal fun Map<String, AntiFeatureV2>.toRepoAntiFeatures(repoId: Long) = map {
|
||||
)],
|
||||
)
|
||||
public data class Category internal constructor(
|
||||
internal val repoId: Long,
|
||||
public val repoId: Long,
|
||||
public val id: String,
|
||||
override val icon: LocalizedFileV2,
|
||||
override val name: LocalizedTextV2,
|
||||
|
||||
Reference in New Issue
Block a user