From 6d04349b2e9976197fda527ca17a4ddfde701923 Mon Sep 17 00:00:00 2001 From: Hardcore Sushi Date: Wed, 6 Sep 2023 19:26:10 +0200 Subject: [PATCH] Prevent volume renaming when open --- app/src/main/java/sushi/hardcore/droidfs/MainActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/sushi/hardcore/droidfs/MainActivity.kt b/app/src/main/java/sushi/hardcore/droidfs/MainActivity.kt index 1f6cbdd..8b68f53 100644 --- a/app/src/main/java/sushi/hardcore/droidfs/MainActivity.kt +++ b/app/src/main/java/sushi/hardcore/droidfs/MainActivity.kt @@ -374,7 +374,7 @@ class MainActivity : BaseActivity(), VolumeAdapter.Listener { ) } } - menu.findItem(R.id.rename).isVisible = onlyOneAndWriteable + menu.findItem(R.id.rename).isVisible = onlyOneAndWriteable && !volumeManager.isOpen(volumeAdapter.volumes[volumeAdapter.selectedItems.first()]) supportActionBar?.setDisplayHomeAsUpEnabled(isSelecting || explorerRouter.pickMode || explorerRouter.dropMode) return true }