File tree Expand file tree Collapse file tree 1 file changed +0
-13
lines changed
opencloudApp/src/main/java/eu/opencloud/android/workers Expand file tree Collapse file tree 1 file changed +0
-13
lines changed Original file line number Diff line number Diff line change @@ -327,11 +327,6 @@ class UploadFileFromFileSystemWorker(
327327 }
328328
329329 private fun updateProgressFromTus (offset : Long , totalSize : Long ) {
330- if (this .isStopped) {
331- Timber .w(" Cancelling TUS upload. The worker is stopped by user or system" )
332- tusUploadHelper.cancel()
333- }
334-
335330 if (totalSize <= 0 ) return
336331 val percent: Int = (100.0 * offset.toDouble() / totalSize.toDouble()).toInt()
337332 if (percent == lastPercent) return
@@ -451,14 +446,6 @@ class UploadFileFromFileSystemWorker(
451446 totalToTransfer : Long ,
452447 filePath : String
453448 ) {
454- if (this .isStopped) {
455- Timber .w(" Cancelling upload operation. The worker is stopped by user or system" )
456- if (::uploadFileOperation.isInitialized) {
457- uploadFileOperation.cancel()
458- uploadFileOperation.removeDataTransferProgressListener(this )
459- }
460- }
461-
462449 val percent: Int = (100.0 * totalTransferredSoFar.toDouble() / totalToTransfer.toDouble()).toInt()
463450 if (percent == lastPercent) return
464451
You can’t perform that action at this time.
0 commit comments