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

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

Issue 310433004: Gallery.app: Update thumbnail when a file is edited on the photo editor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed. Created 6 years, 7 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 | ui/file_manager/gallery/js/image_editor/image_util.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/file_manager/foreground/js/media/media_util.js
diff --git a/ui/file_manager/file_manager/foreground/js/media/media_util.js b/ui/file_manager/file_manager/foreground/js/media/media_util.js
index aa7d0dfec4a0cd68df2d2c7362f6554754bf3e72..4748e867f23e04e5927b7bbdb2ec664f6ec36b51 100644
--- a/ui/file_manager/file_manager/foreground/js/media/media_util.js
+++ b/ui/file_manager/file_manager/foreground/js/media/media_util.js
@@ -49,6 +49,13 @@ function ThumbnailLoader(entry, opt_loaderType, opt_metadata, opt_mediaType,
};
}
+ // If the file is on the drive and it is present, the file may be out of sync
+ // drive's thumbnail. So we don't use it.
+ if (opt_metadata.drive && opt_metadata.drive.present) {
+ opt_metadata = MetadataCache.cloneMetadata(opt_metadata);
+ opt_metadata.thumbnail = null;
+ }
+
if (opt_metadata.thumbnail && opt_metadata.thumbnail.url &&
opt_useEmbedded === ThumbnailLoader.UseEmbedded.USE_EMBEDDED) {
this.thumbnailUrl_ = opt_metadata.thumbnail.url;
« no previous file with comments | « no previous file | ui/file_manager/gallery/js/image_editor/image_util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698