Skip to content

Commit

Permalink
Start implementation of GitLabRepository
Browse files Browse the repository at this point in the history
  • Loading branch information
rumboalla committed Oct 4, 2023
1 parent 6544201 commit b999950
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
12 changes: 12 additions & 0 deletions app/src/main/kotlin/com/apkupdater/data/gitlab/GitLabApp.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package com.apkupdater.data.gitlab

data class GitLabApp(
val packageName: String,
val user: String,
val repo: String
)

val GitLabApps = listOf(
GitLabApp("com.aurora.store", "AuroraOSS", "AuroraStore"),
GitLabApp("com.github.axet.bookreader", "axet", "android-book-reader")
)
27 changes: 27 additions & 0 deletions app/src/main/kotlin/com/apkupdater/repository/GitLabRepository.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package com.apkupdater.repository

import com.apkupdater.data.gitlab.GitLabApps
import com.apkupdater.data.ui.AppInstalled
import com.apkupdater.prefs.Prefs
import com.apkupdater.service.GitLabService
import kotlinx.coroutines.flow.flow


class GitLabRepository(
private val service: GitLabService,
private val prefs: Prefs
) {

suspend fun updates(apps: List<AppInstalled>) = flow {

GitLabApps.forEach { app ->
apps.find { it.packageName == app.packageName }?.let {
//checks.add(checkApp(apps, app.user, app.repo, app.packageName, it.version, app.extra))
}
}
emit(0)
}

private suspend fun checkApp() {}

}

0 comments on commit b999950

Please sign in to comment.