diff --git a/app/build.gradle b/app/build.gradle index 668c48c599..33f53cb669 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -374,7 +374,7 @@ dependencies { kapt "androidx.room:room-compiler:$roomVersion" androidTestImplementation "androidx.room:room-testing:$roomVersion" - implementation "io.coil-kt:coil:2.2.2" + implementation "io.coil-kt:coil:2.4.0" } configurations.all { diff --git a/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt b/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt index fa85de5aad..582bc6ec07 100644 --- a/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt +++ b/app/src/main/java/com/nextcloud/client/jobs/BackgroundJobManagerImpl.kt @@ -23,7 +23,7 @@ import android.os.Build import android.provider.MediaStore import androidx.annotation.RequiresApi import androidx.lifecycle.LiveData -import androidx.lifecycle.Transformations +import androidx.lifecycle.map import androidx.work.Constraints import androidx.work.Data import androidx.work.ExistingPeriodicWorkPolicy @@ -193,7 +193,7 @@ internal class BackgroundJobManagerImpl( private fun WorkManager.getJobInfo(id: UUID): LiveData { val workInfo = getWorkInfoByIdLiveData(id) - return Transformations.map(workInfo) { fromWorkInfo(it) } + return workInfo.map { fromWorkInfo(it) } } /** @@ -208,9 +208,7 @@ internal class BackgroundJobManagerImpl( override val jobs: LiveData> get() { val workInfo = workManager.getWorkInfosByTagLiveData("*") - return Transformations.map(workInfo) { - it.map { fromWorkInfo(it) ?: JobInfo() }.sortedBy { it.started }.reversed() - } + return workInfo.map { it -> it.map { fromWorkInfo(it) ?: JobInfo() }.sortedBy { it.started }.reversed() } } @RequiresApi(Build.VERSION_CODES.N) @@ -463,9 +461,7 @@ internal class BackgroundJobManagerImpl( override fun getFileUploads(user: User): LiveData> { val workInfo = workManager.getWorkInfosByTagLiveData(formatNameTag(JOB_FILES_UPLOAD, user)) - return Transformations.map(workInfo) { - it.map { fromWorkInfo(it) ?: JobInfo() } - } + return workInfo.map { it -> it.map { fromWorkInfo(it) ?: JobInfo() } } } override fun startPdfGenerateAndUploadWork(