浏览代码

this two options are not shown if the file is downloading or uploading

purigarcia 9 年之前
父节点
当前提交
32346efa62
共有 1 个文件被更改,包括 16 次插入0 次删除
  1. 16 0
      src/com/owncloud/android/files/FileMenuFilter.java

+ 16 - 0
src/com/owncloud/android/files/FileMenuFilter.java

@@ -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);
+        }
+
     }
 
 }