App adapted to replacement of OwnCloudClientMap for interface OwnCloudClientManager...
[pub/Android/ownCloud.git] / src / com / owncloud / android / ui / preview / PreviewImageFragment.java
index 0a66966..5e211e5 100644 (file)
@@ -232,6 +232,15 @@ public class PreviewImageFragment extends FileFragment {
             item.setVisible(false);
             item.setEnabled(false);
         }
+        
+        // additional restriction for this fragment 
+        // TODO allow refresh file in PreviewImageFragment
+        item = menu.findItem(R.id.action_sync_file);
+        if (item != null) {
+            item.setVisible(false);
+            item.setEnabled(false);
+        }
+        
     }
 
     
@@ -297,10 +306,10 @@ public class PreviewImageFragment extends FileFragment {
 
     @Override
     public void onDestroy() {
-        super.onDestroy();
         if (mBitmap != null) {
             mBitmap.recycle();
         }
+        super.onDestroy();
     }