From f51977d9ea84f7e1a898543d38fb365efe7a64e7 Mon Sep 17 00:00:00 2001 From: masensio Date: Wed, 12 Feb 2014 18:38:18 +0100 Subject: [PATCH] OC-2922: Fix the bug: Menu in the gallery is not refresh after share or unsharing a file --- src/com/owncloud/android/ui/preview/PreviewImageFragment.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 {