diff --git a/app/src/main/kotlin/com/apkupdater/data/gitlab/GitLabApp.kt b/app/src/main/kotlin/com/apkupdater/data/gitlab/GitLabApp.kt new file mode 100644 index 00000000..8cce6c20 --- /dev/null +++ b/app/src/main/kotlin/com/apkupdater/data/gitlab/GitLabApp.kt @@ -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") +) diff --git a/app/src/main/kotlin/com/apkupdater/repository/GitLabRepository.kt b/app/src/main/kotlin/com/apkupdater/repository/GitLabRepository.kt new file mode 100644 index 00000000..ea519933 --- /dev/null +++ b/app/src/main/kotlin/com/apkupdater/repository/GitLabRepository.kt @@ -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) = 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() {} + +}