Loading app/src/main/java/foundation/e/apps/MainActivity.kt +2 −2 Original line number Diff line number Diff line Loading @@ -221,7 +221,7 @@ class MainActivity : AppCompatActivity() { viewModel: MainActivityViewModel ) { lifecycleScope.launch { if (!checkStorageAvailability(it)) { if (!isStorageAvailable(it)) { showSnackbarMessage(getString(R.string.not_enough_storage)) viewModel.updateUnAvailable(it) return@launch Loading Loading @@ -261,7 +261,7 @@ class MainActivity : AppCompatActivity() { } // TODO: move storage availability code to FileManager Class private fun checkStorageAvailability(fusedDownload: FusedDownload): Boolean { private fun isStorageAvailable(fusedDownload: FusedDownload): Boolean { var availableSpace = 0L availableSpace = calculateAvailableDiskSpace() return availableSpace > fusedDownload.appSize + (500 * (1000 * 1000)) Loading app/src/main/java/foundation/e/apps/manager/database/fusedDownload/FusedDownload.kt +1 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,6 @@ data class FusedDownload( val versionCode: Int = 1, val offerType: Int = -1, val isFree: Boolean = true, val appSize: Long = 0 val appSize: Long = 0, var files: List<File> = mutableListOf() ) Loading
app/src/main/java/foundation/e/apps/MainActivity.kt +2 −2 Original line number Diff line number Diff line Loading @@ -221,7 +221,7 @@ class MainActivity : AppCompatActivity() { viewModel: MainActivityViewModel ) { lifecycleScope.launch { if (!checkStorageAvailability(it)) { if (!isStorageAvailable(it)) { showSnackbarMessage(getString(R.string.not_enough_storage)) viewModel.updateUnAvailable(it) return@launch Loading Loading @@ -261,7 +261,7 @@ class MainActivity : AppCompatActivity() { } // TODO: move storage availability code to FileManager Class private fun checkStorageAvailability(fusedDownload: FusedDownload): Boolean { private fun isStorageAvailable(fusedDownload: FusedDownload): Boolean { var availableSpace = 0L availableSpace = calculateAvailableDiskSpace() return availableSpace > fusedDownload.appSize + (500 * (1000 * 1000)) Loading
app/src/main/java/foundation/e/apps/manager/database/fusedDownload/FusedDownload.kt +1 −1 Original line number Diff line number Diff line Loading @@ -22,6 +22,6 @@ data class FusedDownload( val versionCode: Int = 1, val offerType: Int = -1, val isFree: Boolean = true, val appSize: Long = 0 val appSize: Long = 0, var files: List<File> = mutableListOf() )