From 1d0f70550960a7a3e2f3a8cabeab2dc311659e02 Mon Sep 17 00:00:00 2001 From: "David A. Velasco" Date: Wed, 17 Dec 2014 09:32:13 +0100 Subject: [PATCH] Allow cancelling download of folders as soon as the SynchronizeFolderOperation is in the OperationsService --- src/com/owncloud/android/files/FileMenuFilter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/com/owncloud/android/files/FileMenuFilter.java b/src/com/owncloud/android/files/FileMenuFilter.java index 6d235f23e4..7d1dbb0f75 100644 --- a/src/com/owncloud/android/files/FileMenuFilter.java +++ b/src/com/owncloud/android/files/FileMenuFilter.java @@ -31,6 +31,7 @@ import com.owncloud.android.files.services.FileDownloader; import com.owncloud.android.files.services.FileDownloader.FileDownloaderBinder; import com.owncloud.android.files.services.FileUploader; import com.owncloud.android.files.services.FileUploader.FileUploaderBinder; +import com.owncloud.android.services.OperationsService.OperationsServiceBinder; import com.owncloud.android.ui.activity.ComponentsGetter; /** @@ -141,6 +142,8 @@ public class FileMenuFilter { if (mComponentsGetter != null && mFile != null && mAccount != null) { FileDownloaderBinder downloaderBinder = mComponentsGetter.getFileDownloaderBinder(); downloading = downloaderBinder != null && downloaderBinder.isDownloading(mAccount, mFile); + OperationsServiceBinder opsBinder = mComponentsGetter.getOperationsServiceBinder(); + downloading |= (opsBinder != null && opsBinder.isSynchronizing(mAccount, mFile.getRemotePath())); FileUploaderBinder uploaderBinder = mComponentsGetter.getFileUploaderBinder(); uploading = uploaderBinder != null && uploaderBinder.isUploading(mAccount, mFile); }