refactor: Disable update for dev build (#1673)

Co-authored-by: Pun Butrach <pun.butrach@gmail.com>
This commit is contained in:
Benjamin 2024-02-17 10:17:27 -08:00 committed by GitHub
parent 39536c0e18
commit 16cdc7aca4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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