From 9a1912c12960c521790c2fc537bc3f9378b7eb3d Mon Sep 17 00:00:00 2001 From: guillermolagos Date: Tue, 22 Dec 2020 14:44:20 -0300 Subject: [PATCH] Respaldo SV-TL v2.3 --- svtl/src/main/java/guillermo/lagos/svtl/file/FileResult.kt | 2 ++ svtl/src/main/java/guillermo/lagos/svtl/file/FileVM.kt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/svtl/src/main/java/guillermo/lagos/svtl/file/FileResult.kt b/svtl/src/main/java/guillermo/lagos/svtl/file/FileResult.kt index 03ea92a..ed52753 100644 --- a/svtl/src/main/java/guillermo/lagos/svtl/file/FileResult.kt +++ b/svtl/src/main/java/guillermo/lagos/svtl/file/FileResult.kt @@ -10,5 +10,7 @@ sealed class FileResult { data class Copied(val fileCopied: Boolean?) : FileResult() + data class Pass(val fileCopied: Boolean) : FileResult() + object Error : FileResult() } \ No newline at end of file diff --git a/svtl/src/main/java/guillermo/lagos/svtl/file/FileVM.kt b/svtl/src/main/java/guillermo/lagos/svtl/file/FileVM.kt index dee9b90..5e3a732 100644 --- a/svtl/src/main/java/guillermo/lagos/svtl/file/FileVM.kt +++ b/svtl/src/main/java/guillermo/lagos/svtl/file/FileVM.kt @@ -47,7 +47,7 @@ class FileVM(private val fileUtil: FileUtil) : ViewModel(), CoroutineScope { copyDatabaseZip(db_file, file_name) } fileResultLiveData.value = FileResult.Copied(destinationFile) - }else fileResultLiveData.value = FileResult.Copied(true) + }else fileResultLiveData.value = FileResult.Pass(true) } catch (exception: Exception) {