Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(742)

Unified Diff: ui/file_manager/file_manager/foreground/js/file_manager.js

Issue 328003004: Files.app: updateGearMenu_ should be called against the new volume info. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/foreground/js/file_manager.js
diff --git a/ui/file_manager/file_manager/foreground/js/file_manager.js b/ui/file_manager/file_manager/foreground/js/file_manager.js
index b1b9cbb2d1f830137cfc31907afaf5afb799a419..8e1d5eef7cc715c3c68ef16994ac06692dde0e8c 100644
--- a/ui/file_manager/file_manager/foreground/js/file_manager.js
+++ b/ui/file_manager/file_manager/foreground/js/file_manager.js
@@ -2346,21 +2346,21 @@ var BOTTOM_MARGIN_FOR_PREVIEW_PANEL_PX = 52;
* @private
*/
FileManager.prototype.onDirectoryChanged_ = function(event) {
- var newCurrentVolumeInfo = this.volumeManager_.getVolumeInfo(
+ var oldCurrentVolumeInfo = this.currentVolumeInfo_;
+
+ // Remember the current volume info.
+ this.currentVolumeInfo_ = this.volumeManager_.getVolumeInfo(
event.newDirEntry);
// If volume has changed, then update the gear menu.
- if (this.currentVolumeInfo_ !== newCurrentVolumeInfo) {
+ if (oldCurrentVolumeInfo !== this.currentVolumeInfo_) {
this.updateGearMenu_();
// If the volume has changed, and it was previously set, then do not
// close on unmount anymore.
- if (this.currentVolumeInfo_)
+ if (oldCurrentVolumeInfo)
this.closeOnUnmount_ = false;
}
- // Remember the current volume info.
- this.currentVolumeInfo_ = newCurrentVolumeInfo;
-
this.selectionHandler_.onFileSelectionChanged();
this.ui_.searchBox.clear();
// TODO(mtomasz): Consider remembering the selection.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698