Only display "Show all Play folders" for My files and subdirectories.
Currently this is shown for all roots. Bug: 875380 Test: Tested on kevin. Change-Id: Ied92804c5a3936d458b38e84daf973c5928b3534 Reviewed-on: https://chromium-review.googlesource.com/1186206 Reviewed-by: Naoki Fukino <fukino@chromium.org> Commit-Queue: Alex Lau <alexlau@chromium.org> Cr-Commit-Position: refs/heads/master@{#585724}
This commit is contained in:
@ -831,9 +831,16 @@ CommandHandler.COMMANDS_['toggle-hidden-android-folders'] =
|
||||
* @param {!CommandHandlerDeps} fileManager CommandHandlerDeps to use.
|
||||
*/
|
||||
canExecute: function(event, fileManager) {
|
||||
event.canExecute =
|
||||
var hasAndroidFilesVolumeInfo =
|
||||
!!fileManager.volumeManager.getCurrentProfileVolumeInfo(
|
||||
VolumeManagerCommon.VolumeType.ANDROID_FILES);
|
||||
var currentRootType = fileManager.directoryModel.getCurrentRootType();
|
||||
var isInMyFiles =
|
||||
currentRootType == VolumeManagerCommon.RootType.MY_FILES ||
|
||||
currentRootType == VolumeManagerCommon.RootType.DOWNLOADS ||
|
||||
currentRootType == VolumeManagerCommon.RootType.CROSTINI ||
|
||||
currentRootType == VolumeManagerCommon.RootType.ANDROID_FILES;
|
||||
event.canExecute = hasAndroidFilesVolumeInfo && isInMyFiles;
|
||||
event.command.setHidden(!event.canExecute);
|
||||
event.command.checked =
|
||||
fileManager.fileFilter.isAllAndroidFoldersVisible();
|
||||
|
Reference in New Issue
Block a user