Skip to content

Commit

Permalink
Remove legacy update functions
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianDevel committed Dec 19, 2023
1 parent 89d5279 commit bbc843e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ import kotlinx.coroutines.withContext

object StoreUtils {

//region legacy App update
// TODO: Remove this when Ui for kDrive in app update will be made
fun FragmentActivity.checkUpdateIsAvailable(appId: String, versionCode: Int, onResult: (updateIsAvailable: Boolean) -> Unit) {
checkUpdateIsAvailable(appId = appId, versionCode = versionCode, inAppResultLauncher = null, onFDroidResult = onResult)
}
//endRegion

//region In-App Update
fun initAppUpdateManager(context: Context, onUpdateDownloaded: () -> Unit, onUpdateInstalled: () -> Unit) = Unit

Expand Down
12 changes: 0 additions & 12 deletions Stores/src/standard/java/com.infomaniak.lib.stores/StoreUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,6 @@ object StoreUtils {
}
}

//region legacy App update
// TODO: Remove this when Ui for kDrive in app update will be made
fun FragmentActivity.checkUpdateIsAvailable(appId: String, versionCode: Int, onResult: (updateIsAvailable: Boolean) -> Unit) {
AppUpdateManagerFactory.create(this).appUpdateInfo.addOnSuccessListener { appUpdateInfo ->
val updateIsAvailable = appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE &&
appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.FLEXIBLE)

onResult(updateIsAvailable)
}
}
//endRegion

//region In-App Update
fun initAppUpdateManager(context: Context, onUpdateDownloaded: () -> Unit, onUpdateInstalled: () -> Unit) {
appUpdateManager = AppUpdateManagerFactory.create(context)
Expand Down

0 comments on commit bbc843e

Please sign in to comment.