Prevent volume renaming when open

This commit is contained in:
Matéo Duparc 2023-09-06 19:26:10 +02:00
parent de0194a722
commit 6d04349b2e
Signed by: hardcoresushi
GPG Key ID: AFE384344A45E13A

View File

@ -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) supportActionBar?.setDisplayHomeAsUpEnabled(isSelecting || explorerRouter.pickMode || explorerRouter.dropMode)
return true return true
} }