Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a0590d44 authored by Hasib Prince's avatar Hasib Prince
Browse files

App Lounge: refactored a function name in MainActivity

parent 1c4147a6
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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
@@ -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))
+1 −1
Original line number Diff line number Diff line
@@ -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()
)