🧭 add mirrors to default_repos.xml

This commit is contained in:
Michael Pöhn
2023-07-11 17:25:45 +02:00
committed by Torsten Grote
parent 7459381f0c
commit bcd9cc0548
6 changed files with 60 additions and 10 deletions

View File

@@ -375,9 +375,10 @@ internal data class RepositoryPreferences(
/**
* A reduced version of [Repository] used to pre-populate the [FDroidDatabase].
*/
public data class InitialRepository(
public data class InitialRepository @JvmOverloads constructor(
val name: String,
val address: String,
val mirrors: List<String> = emptyList(),
val description: String,
val certificate: String,
val version: Long,

View File

@@ -140,6 +140,7 @@ internal interface RepositoryDaoInt : RepositoryDao {
enabled = initialRepo.enabled,
)
insert(repositoryPreferences)
insertMirrors(initialRepo.mirrors.map { it -> Mirror(repoId, it, null) })
return repoId
}