this two options are not shown if the file is downloading or uploading
authorpurigarcia <pgarcia@solidgear.es>
Wed, 8 Jul 2015 06:55:41 +0000 (08:55 +0200)
committerpurigarcia <pgarcia@solidgear.es>
Wed, 8 Jul 2015 06:55:41 +0000 (08:55 +0200)
src/com/owncloud/android/files/FileMenuFilter.java

index d6c075d..4ed9e64 100644 (file)
@@ -215,6 +215,22 @@ public class FileMenuFilter {
             toShow.add(R.id.action_send_file);
         }
 
+        // FAVORITES
+        if (mFile == null || downloading || uploading) {
+            toHide.add(R.id.action_favorite_file);
+
+        } else {
+            toShow.add(R.id.action_favorite_file);
+        }
+
+        // UNFAVORITES
+        if (mFile == null || downloading || uploading) {
+            toHide.add(R.id.action_unfavorite_file);
+
+        } else {
+            toShow.add(R.id.action_unfavorite_file);
+        }
+
     }
 
 }