diff --git a/app/src/main/java/net/gsantner/opoc/frontend/filebrowser/GsFileBrowserFragment.java b/app/src/main/java/net/gsantner/opoc/frontend/filebrowser/GsFileBrowserFragment.java index 956e6f8bd9..742285adc5 100644 --- a/app/src/main/java/net/gsantner/opoc/frontend/filebrowser/GsFileBrowserFragment.java +++ b/app/src/main/java/net/gsantner/opoc/frontend/filebrowser/GsFileBrowserFragment.java @@ -229,6 +229,7 @@ private void updateMenuItems() { final boolean selMultiMore = _dopt.doSelectMultiple && selCount > 1; final boolean selMultiAny = selMultiMore || selMulti1; final boolean selFilesOnly = _filesystemViewerAdapter.isFilesOnlySelected(); + final boolean selInVirtualDirectory = _filesystemViewerAdapter.isCurrentFolderVirtual(); // Check if is a favourite boolean selTextFilesOnly = true; @@ -246,9 +247,9 @@ private void updateMenuItems() { if (_fragmentMenu != null && _fragmentMenu.findItem(R.id.action_delete_selected_items) != null) { _fragmentMenu.findItem(R.id.action_search).setVisible(selFiles.isEmpty() && !_filesystemViewerAdapter.isCurrentFolderVirtual()); _fragmentMenu.findItem(R.id.action_delete_selected_items).setVisible((selMulti1 || selMultiMore) && selWritable); - _fragmentMenu.findItem(R.id.action_rename_selected_item).setVisible(selMulti1 && selWritable); + _fragmentMenu.findItem(R.id.action_rename_selected_item).setVisible(selMulti1 && selWritable & !selInVirtualDirectory); _fragmentMenu.findItem(R.id.action_info_selected_item).setVisible(selMulti1); - _fragmentMenu.findItem(R.id.action_move_selected_items).setVisible((selMulti1 || selMultiMore) && selWritable && !_cu.isUnderStorageAccessFolder(getContext(), getCurrentFolder(), true)); + _fragmentMenu.findItem(R.id.action_move_selected_items).setVisible((selMulti1 || selMultiMore) && selWritable && !selInVirtualDirectory && !_cu.isUnderStorageAccessFolder(getContext(), getCurrentFolder(), true)); _fragmentMenu.findItem(R.id.action_copy_selected_items).setVisible((selMulti1 || selMultiMore) && selWritable && !_cu.isUnderStorageAccessFolder(getContext(), getCurrentFolder(), true)); _fragmentMenu.findItem(R.id.action_share_files).setVisible(selFilesOnly && (selMulti1 || selMultiMore) && !_cu.isUnderStorageAccessFolder(getContext(), getCurrentFolder(), true)); _fragmentMenu.findItem(R.id.action_go_to).setVisible(!_filesystemViewerAdapter.areItemsSelected());