Skip to content

Commit

Permalink
add checks for conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
MrSltun committed Oct 21, 2024
1 parent a4f0576 commit a52a620
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions android/app/src/main/java/net/artsy/app/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit a52a620

Please sign in to comment.