X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/271a4ba1dfdea914b70ef3b10f6930de68d39d68..a9a1ad71e9495be4ed6d3e4033456d1161904c7c:/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java diff --git a/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java b/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java index 8dcdb9cc..cd26b2a1 100644 --- a/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java +++ b/src/eu/alefzero/owncloud/ui/fragment/FileDetailFragment.java @@ -186,7 +186,7 @@ public class FileDetailFragment extends SherlockFragment implements @Override public void onClick(View v) { if (v.getId() == R.id.fdDownloadBtn) { - Toast.makeText(getActivity(), "Downloading", Toast.LENGTH_LONG).show(); + //Toast.makeText(getActivity(), "Downloading", Toast.LENGTH_LONG).show(); Intent i = new Intent(getActivity(), FileDownloader.class); i.putExtra(FileDownloader.EXTRA_ACCOUNT, mAccount); i.putExtra(FileDownloader.EXTRA_REMOTE_PATH, mFile.getRemotePath()); @@ -466,12 +466,11 @@ public class FileDetailFragment extends SherlockFragment implements if (getView()!=null && getView().findViewById(R.id.fdDownloadBtn) != null) getView().findViewById(R.id.fdDownloadBtn).setEnabled(true); - if (intent.getAction().equals(FileDownloader.BAD_DOWNLOAD_MESSAGE)) { - Toast.makeText(context, R.string.downloader_download_failed , Toast.LENGTH_SHORT).show(); - - } else if (intent.getAction().equals(FileDownloader.DOWNLOAD_FINISH_MESSAGE)) { + if (intent.getBooleanExtra(FileDownloader.EXTRA_DOWNLOAD_RESULT, false)) { mFile.setStoragePath(intent.getStringExtra(FileDownloader.EXTRA_FILE_PATH)); updateFileDetails(); + } else if (intent.getAction().equals(FileDownloader.DOWNLOAD_FINISH_MESSAGE)) { + Toast.makeText(context, R.string.downloader_download_failed , Toast.LENGTH_SHORT).show(); } }