| Index: ui/file_manager/file_manager/foreground/js/import_controller.js
|
| diff --git a/ui/file_manager/file_manager/foreground/js/import_controller.js b/ui/file_manager/file_manager/foreground/js/import_controller.js
|
| index 343b1d2f33cd274ce04032488a00eb1e19c7e83d..a217242890392d25874cde149bac5da6085383de 100644
|
| --- a/ui/file_manager/file_manager/foreground/js/import_controller.js
|
| +++ b/ui/file_manager/file_manager/foreground/js/import_controller.js
|
| @@ -71,6 +71,13 @@ importer.ImportController =
|
| */
|
| this.lastActivityState_ = importer.ActivityState.HIDDEN;
|
|
|
| + /**
|
| + * Whether the window was opened by plugging a media device and user hadn't
|
| + * navigated to other directories.
|
| + * @private {boolean}
|
| + */
|
| + this.isRightAfterPluggingMedia_ = false;
|
| +
|
| var listener = this.onScanEvent_.bind(this);
|
| this.scanner_.addObserver(listener);
|
| // Remove the observer when the foreground window is closed.
|
| @@ -163,11 +170,7 @@ importer.ImportController.prototype.onVolumeUnmounted_ = function(volumeId) {
|
| * @private
|
| */
|
| importer.ImportController.prototype.onDirectoryChanged_ = function(event) {
|
| - if (!event.previousDirEntry &&
|
| - event.newDirEntry &&
|
| - importer.isMediaDirectory(event.newDirEntry, this.environment_)) {
|
| - this.commandWidget_.setDetailsVisible(true);
|
| - }
|
| + this.isRightAfterPluggingMedia_ = !event.previousDirEntry;
|
|
|
| this.scanManager_.reset();
|
| if (this.isCurrentDirectoryScannable_()) {
|
| @@ -390,6 +393,10 @@ importer.ImportController.prototype.checkState_ = function(opt_scan) {
|
| this.updateUi_(
|
| importer.ActivityState.READY, // to import...
|
| opt_scan);
|
| + if (this.isRightAfterPluggingMedia_) {
|
| + this.isRightAfterPluggingMedia_ = false;
|
| + this.commandWidget_.setDetailsVisible(true);
|
| + }
|
| }.bind(this))
|
| .catch(importer.getLogger().catcher('import-controller-check-state'));
|
| };
|
|
|