mirror of
https://github.com/nextcloud/android.git
synced 2024-11-28 02:06:56 +03:00
Merge pull request #812 from owncloud/download_folder__update_contextual_menu_asap
Allow cancelling download of folders as soon as the SynchronizeFolderOpe...
This commit is contained in:
commit
732ab432a4
1 changed files with 3 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue