Browse Source

OC-2922: Fix the bug: Menu in the gallery is not refresh after share or unsharing a file

masensio 11 năm trước cách đây
mục cha
commit
f51977d9ea

+ 2 - 1
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 {