Quellcode durchsuchen

Hide select and deselect all on preview and details fragments, fix #1574

This change makes select/deselect menu items invisible on fragments where they should be invisible. To do this, first was needed to "split" two different "select all" actions into different ones, so they are not overlapped. For that, one of them was changed from "action_select_all" to "action_select_all_action_menu". Second, in method filter() that decides which menu items are visible, "inSingleFileFragment" bool is pushed. This is how we decide are we under some listing, or showing single file (either details or any preview fragment).
Branko Kokanovic vor 7 Jahren
Ursprung
Commit
4315e6f305

+ 7 - 0
src/main/java/com/owncloud/android/ui/fragment/FileDetailFragment.java

@@ -228,6 +228,13 @@ public class FileDetailFragment extends FileFragment implements OnClickListener,
             item.setEnabled(false);
         }
 
+        // additional restriction for this fragment
+        item = menu.findItem(R.id.action_select_all);
+        if (item != null) {
+            item.setVisible(false);
+            item.setEnabled(false);
+        }
+
         // additional restriction for this fragment
         item = menu.findItem(R.id.action_move);
         if (item != null) {