From a52a6205f539f02ac34ac9d103b2c70ad21b11bf Mon Sep 17 00:00:00 2001 From: Sultan Date: Mon, 21 Oct 2024 17:53:08 +0200 Subject: [PATCH] add checks for conditions --- android/app/src/main/java/net/artsy/app/MainActivity.kt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/android/app/src/main/java/net/artsy/app/MainActivity.kt b/android/app/src/main/java/net/artsy/app/MainActivity.kt index 675e54e47c3..e995cdffe94 100644 --- a/android/app/src/main/java/net/artsy/app/MainActivity.kt +++ b/android/app/src/main/java/net/artsy/app/MainActivity.kt @@ -118,6 +118,12 @@ class MainActivity : ReactActivity() { appUpdateInfoTask.addOnSuccessListener { appUpdateInfo -> Log.d(TAG, "checkForAppUpdate: adding listener, appUpdateInfo: ${appUpdateInfo.toString()}") + + Log.d(TAG, "checkForAppUpdate: conditions: \n" + + "appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE: ${appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE}\n" + + "(appUpdateInfo.clientVersionStalenessDays() ?: -1) >= DAYS_FOR_FLEXIBLE_UPDATE: ${(appUpdateInfo.clientVersionStalenessDays() ?: -1) >= DAYS_FOR_FLEXIBLE_UPDATE}" + + "appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE): ${appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE)}" + ) if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE && (appUpdateInfo.clientVersionStalenessDays() ?: -1) >= DAYS_FOR_FLEXIBLE_UPDATE && appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE)) {