X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/b246cf7075c829a7662047e89a927c0b6cc18ac5..b416f87c9201b63cb162a5ff3a059a2de81863a4:/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 91980e5f..c84e2cff 100644 --- a/src/com/owncloud/android/ui/fragment/FileDetailFragment.java +++ b/src/com/owncloud/android/ui/fragment/FileDetailFragment.java @@ -245,8 +245,8 @@ public class FileDetailFragment extends SherlockFragment implements case R.id.fdDownloadBtn: { //if (FileDownloader.isDownloading(mAccount, mFile.getRemotePath())) { FileDownloaderBinder downloaderBinder = mContainerActivity.getFileDownloaderBinder(); - if (downloaderBinder != null && downloaderBinder.isDownloading(mAccount, mFile.getRemotePath())) { - downloaderBinder.cancel(mAccount, mFile.getRemotePath()); + if (downloaderBinder != null && downloaderBinder.isDownloading(mAccount, mFile)) { + downloaderBinder.cancel(mAccount, mFile); if (mFile.isDown()) { setButtonsForDown(); } else { @@ -256,9 +256,10 @@ public class FileDetailFragment extends SherlockFragment implements } else { Intent i = new Intent(getActivity(), FileDownloader.class); i.putExtra(FileDownloader.EXTRA_ACCOUNT, mAccount); - i.putExtra(FileDownloader.EXTRA_REMOTE_PATH, mFile.getRemotePath()); + i.putExtra(FileDownloader.EXTRA_FILE, mFile); + /*i.putExtra(FileDownloader.EXTRA_REMOTE_PATH, mFile.getRemotePath()); i.putExtra(FileDownloader.EXTRA_FILE_PATH, mFile.getRemotePath()); - i.putExtra(FileDownloader.EXTRA_FILE_SIZE, mFile.getFileLength()); + i.putExtra(FileDownloader.EXTRA_FILE_SIZE, mFile.getFileLength());*/ // update ui setButtonsForTransferring(); @@ -443,7 +444,7 @@ public class FileDetailFragment extends SherlockFragment implements // configure UI for depending upon local state of the file //if (FileDownloader.isDownloading(mAccount, mFile.getRemotePath()) || FileUploader.isUploading(mAccount, mFile.getRemotePath())) { FileDownloaderBinder downloaderBinder = mContainerActivity.getFileDownloaderBinder(); - if ((downloaderBinder != null && downloaderBinder.isDownloading(mAccount, mFile.getRemotePath())) || FileUploader.isUploading(mAccount, mFile.getRemotePath())) { + if ((downloaderBinder != null && downloaderBinder.isDownloading(mAccount, mFile)) || FileUploader.isUploading(mAccount, mFile.getRemotePath())) { setButtonsForTransferring(); } else if (mFile.isDown()) {