mirror of
https://github.com/Suwayomi/TachideskJUI.git
synced 2025-12-10 06:42:05 +01:00
Check run updater preference in action
This commit is contained in:
@@ -21,8 +21,8 @@ class UpdateChecker @Inject constructor(
|
||||
private val updatePreferences: UpdatePreferences,
|
||||
private val client: Http
|
||||
) {
|
||||
fun checkForUpdates() = flow {
|
||||
// if (!updatePreferences.enabled().get()) return
|
||||
fun checkForUpdates(manualFetch: Boolean) = flow {
|
||||
if (!manualFetch && !updatePreferences.enabled().get()) return@flow
|
||||
val latestRelease = client.get(
|
||||
"https://api.github.com/repos/$GITHUB_REPO/releases/latest"
|
||||
).body<GithubRelease>()
|
||||
|
||||
Reference in New Issue
Block a user