mirror of
https://github.com/null2264/yokai.git
synced 2025-06-21 10:44:42 +00:00
chore: Clean up commented codes
This commit is contained in:
parent
11e66667ff
commit
716cc1fac8
2 changed files with 0 additions and 25 deletions
|
@ -9,24 +9,6 @@ import kotlinx.coroutines.flow.Flow
|
|||
import kotlinx.coroutines.flow.map
|
||||
|
||||
class ExtensionRepoRepositoryImpl(private val handler: DatabaseHandler): ExtensionRepoRepository {
|
||||
/*
|
||||
override fun addRepo(url: String): Result<Nothing> {
|
||||
if (!url.matches(repoRegex))
|
||||
return Result.Error("Invalid URL")
|
||||
|
||||
sourcePreferences.extensionRepos() += url.substringBeforeLast("/index.min.json")
|
||||
|
||||
return Result.Success()
|
||||
}
|
||||
|
||||
override fun deleteRepo(repo: String) {
|
||||
sourcePreferences.extensionRepos() -= repo
|
||||
}
|
||||
|
||||
override fun getRepoFlow() =
|
||||
sourcePreferences.extensionRepos().changes()
|
||||
.map { it.sortedWith(String.CASE_INSENSITIVE_ORDER) }
|
||||
*/
|
||||
override fun subscribeAll(): Flow<List<ExtensionRepo>> =
|
||||
handler.subscribeToList { extension_reposQueries.findAll(::mapExtensionRepo) }
|
||||
|
||||
|
|
|
@ -34,11 +34,4 @@ interface ExtensionRepoRepository {
|
|||
}
|
||||
suspend fun replaceRepository(newRepo: ExtensionRepo)
|
||||
suspend fun deleteRepository(baseUrl: String)
|
||||
/*
|
||||
fun addRepo(url: String): Result<Nothing>
|
||||
|
||||
fun deleteRepo(repo: String)
|
||||
|
||||
fun getRepoFlow(): Flow<List<String>>
|
||||
*/
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue