[app] Use RepoManager for enabling/disabling repos

This commit is contained in:
Torsten Grote
2023-05-26 17:25:14 -03:00
committed by Hans-Christoph Steiner
parent e382900f39
commit b70b3a9a06
2 changed files with 12 additions and 1 deletions

View File

@@ -71,6 +71,14 @@ public class RepoManager @JvmOverloads constructor(
return repositoriesState.value
}
/**
* Enables or disables the repository with the given [repoId].
* Data from disabled repositories is ignored in many queries.
*/
@WorkerThread
public fun setRepositoryEnabled(repoId: Long, enabled: Boolean): Unit =
repositoryDao.setRepositoryEnabled(repoId, enabled)
/**
* Removes a Repository with the given repoId with all associated data from the database.
*/