From 16cdc7aca4ad25236278960c135a8f4c352fff6b Mon Sep 17 00:00:00 2001 From: Benjamin <73490201+BenjaminHalko@users.noreply.github.com> Date: Sat, 17 Feb 2024 10:17:27 -0800 Subject: [PATCH] refactor: Disable update for dev build (#1673) Co-authored-by: Pun Butrach --- .../java/app/revanced/manager/ui/viewmodel/MainViewModel.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/app/revanced/manager/ui/viewmodel/MainViewModel.kt b/app/src/main/java/app/revanced/manager/ui/viewmodel/MainViewModel.kt index d32b36aa..3a897ed4 100644 --- a/app/src/main/java/app/revanced/manager/ui/viewmodel/MainViewModel.kt +++ b/app/src/main/java/app/revanced/manager/ui/viewmodel/MainViewModel.kt @@ -23,6 +23,7 @@ import app.revanced.manager.domain.repository.PatchSelectionRepository import app.revanced.manager.domain.repository.SerializedSelection import app.revanced.manager.network.api.ReVancedAPI import app.revanced.manager.ui.theme.Theme +import app.revanced.manager.util.isDebuggable import app.revanced.manager.util.tag import app.revanced.manager.util.toast import app.revanced.manager.util.uiSafe @@ -52,7 +53,7 @@ class MainViewModel( } private suspend fun checkForManagerUpdates() { - if (!prefs.managerAutoUpdates.get() || !networkInfo.isConnected()) return + if (app.isDebuggable || !prefs.managerAutoUpdates.get() || !networkInfo.isConnected()) return uiSafe(app, R.string.failed_to_check_updates, "Failed to check for updates") { updatedManagerVersion = reVancedAPI.getAppUpdate()?.version