Commit 33910a55 authored by Naoki Fukino's avatar Naoki Fukino Committed by Commit Bot

Files app: Display "Show hidden Play folders" conditionally.

The gear menu option "Show hidden Play folders" doesn't make sense when the
"Play Files" volume is not mounted.
The option should be visible only when the corresponding volume is mounted.

Bug: 851385
Test: Manually tested on Eve.
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I5f39a669890c455cbd9763a6d0d047854545acca
Reviewed-on: https://chromium-review.googlesource.com/1100721
Commit-Queue: Naoki Fukino <fukino@chromium.org>
Reviewed-by: default avatarJoel Hockey <joelhockey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567225}
parent 8b1e2e29
...@@ -795,7 +795,12 @@ CommandHandler.COMMANDS_['toggle-hidden-android-folders'] = ...@@ -795,7 +795,12 @@ CommandHandler.COMMANDS_['toggle-hidden-android-folders'] =
* @param {!Event} event Command event. * @param {!Event} event Command event.
* @param {!CommandHandlerDeps} fileManager CommandHandlerDeps to use. * @param {!CommandHandlerDeps} fileManager CommandHandlerDeps to use.
*/ */
canExecute: CommandUtil.canExecuteAlways canExecute: function(event, fileManager) {
event.canExecute =
!!fileManager.volumeManager.getCurrentProfileVolumeInfo(
VolumeManagerCommon.VolumeType.ANDROID_FILES);
event.command.setHidden(!event.canExecute);
}
}); });
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment