From 88f8d683d25537702177128ef9e938d8a1ea6fa6 Mon Sep 17 00:00:00 2001 From: Abdourahamane Boinaidi Date: Wed, 30 Oct 2024 14:34:40 +0100 Subject: [PATCH 1/2] fix: Finish and remove upload session --- .../multiplatform_swisstransfer/managers/UploadManager.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/managers/UploadManager.kt b/STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/managers/UploadManager.kt index 013efc34..684017e6 100644 --- a/STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/managers/UploadManager.kt +++ b/STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/managers/UploadManager.kt @@ -242,6 +242,7 @@ class UploadManager( uploadRepository.finishUpload(finishUploadBody).first() }.getOrElse { throw UnknownException(it) } + uploadController.removeUploadSession(uuid) transferManager.addTransferByLinkUUID(finishUploadResponse.linkUUID) // TODO: If we can't retrieve the transfer cause of the Internet, we should put it in Realm and try again later. From e52424cb31f86c9fc679bd700f4a2cd3e02a9dfd Mon Sep 17 00:00:00 2001 From: Abdourahamane Boinaidi Date: Wed, 30 Oct 2024 14:38:49 +0100 Subject: [PATCH 2/2] refactor: Remove useless space --- .../multiplatform_swisstransfer/managers/UploadManager.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/managers/UploadManager.kt b/STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/managers/UploadManager.kt index 684017e6..1ae938e4 100644 --- a/STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/managers/UploadManager.kt +++ b/STCore/src/commonMain/kotlin/com/infomaniak/multiplatform_swisstransfer/managers/UploadManager.kt @@ -202,7 +202,7 @@ class UploadManager( } /** - * Finishes an upload session and add the transfer to the database . + * Finishes an upload session and add the transfer to the database. * * @param uuid The UUID of the upload session. *