X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/d8ac7b2241bc99df58b5f4be4c3c4d83fc9efaf6..ec6b9d7c70deb50152bfab5cb5f25c9a2dde28e7:/src/com/owncloud/android/ui/fragment/FileDetailFragment.java diff --git a/src/com/owncloud/android/ui/fragment/FileDetailFragment.java b/src/com/owncloud/android/ui/fragment/FileDetailFragment.java index dc607b51..30ac7e1c 100644 --- a/src/com/owncloud/android/ui/fragment/FileDetailFragment.java +++ b/src/com/owncloud/android/ui/fragment/FileDetailFragment.java @@ -346,8 +346,12 @@ public class FileDetailFragment extends FileFragment implements OnClickListener cb.setChecked(file.keepInSync()); // configure UI for depending upon local state of the file + FileDownloaderBinder downloaderBinder = mContainerActivity.getFileDownloaderBinder(); FileUploaderBinder uploaderBinder = mContainerActivity.getFileUploaderBinder(); - if (transferring || file.isDownloading() || uploaderBinder.isUploading(mAccount, file)) { + if (transferring || + (downloaderBinder != null && downloaderBinder.isDownloading(mAccount, file)) || + (uploaderBinder != null && uploaderBinder.isUploading(mAccount, file)) + ) { setButtonsForTransferring(); } else if (file.isDown()) { @@ -446,8 +450,10 @@ public class FileDetailFragment extends FileFragment implements OnClickListener getView().findViewById(R.id.fdProgressBlock).setVisibility(View.VISIBLE); TextView progressText = (TextView)getView().findViewById(R.id.fdProgressText); progressText.setVisibility(View.VISIBLE); + FileDownloaderBinder downloaderBinder = mContainerActivity.getFileDownloaderBinder(); FileUploaderBinder uploaderBinder = mContainerActivity.getFileUploaderBinder(); - if (getFile().isDownloading()) { + //if (getFile().isDownloading()) { + if (downloaderBinder != null && downloaderBinder.isDownloading(mAccount, getFile())) { progressText.setText(R.string.downloader_download_in_progress_ticker); } else if (uploaderBinder != null && uploaderBinder.isUploading(mAccount, getFile())) { progressText.setText(R.string.uploader_upload_in_progress_ticker);