diff --git a/src/com/owncloud/android/ui/preview/PreviewImageFragment.java b/src/com/owncloud/android/ui/preview/PreviewImageFragment.java index 0ce3347776..4785a13488 100644 --- a/src/com/owncloud/android/ui/preview/PreviewImageFragment.java +++ b/src/com/owncloud/android/ui/preview/PreviewImageFragment.java @@ -269,7 +269,8 @@ public class PreviewImageFragment extends FileFragment implements OnRemoteOper MenuItem item = menu.findItem(R.id.action_unshare_file); // Options shareLink - if (!getFile().isShareByLink()) { + OCFile file = ((FileActivity) getSherlockActivity()).getFile(); + if (!file.isShareByLink()) { item.setVisible(false); item.setEnabled(false); } else {