X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/blobdiff_plain/803568ab277b7b7791ec792300e85e2fc880c3eb..6a6d83311f01da26ce50b4f64111c254022eb47b:/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 eadba154..2bf9b734 100644 --- a/src/com/owncloud/android/ui/fragment/FileDetailFragment.java +++ b/src/com/owncloud/android/ui/fragment/FileDetailFragment.java @@ -321,7 +321,7 @@ public class FileDetailFragment extends SherlockFragment implements toShow.add(R.id.action_open_file_with); toShow.add(R.id.action_sync_file); - } else { + } else if (mFile != null) { toHide.add(R.id.action_open_file_with); toHide.add(R.id.action_cancel_download); toHide.add(R.id.action_cancel_upload); @@ -330,6 +330,16 @@ public class FileDetailFragment extends SherlockFragment implements toShow.add(R.id.action_rename_file); toShow.add(R.id.action_remove_file); toShow.add(R.id.action_download_file); + + } else { + toHide.add(R.id.action_open_file_with); + toHide.add(R.id.action_cancel_download); + toHide.add(R.id.action_cancel_upload); + toHide.add(R.id.action_sync_file); + toHide.add(R.id.action_download_file); + toHide.add(R.id.action_rename_file); + toHide.add(R.id.action_remove_file); + } MenuItem item = null;