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

Unified Diff: ui/file_manager/gallery/js/image_editor/image_util.js

Issue 853653004: Gallery: Add items to GalleryDataModel before loading their metadata. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed. Created 5 years, 8 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 | « ui/file_manager/gallery/js/gallery_item.js ('k') | ui/file_manager/gallery/js/mosaic_mode.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/file_manager/gallery/js/image_editor/image_util.js
diff --git a/ui/file_manager/gallery/js/image_editor/image_util.js b/ui/file_manager/gallery/js/image_editor/image_util.js
index 0023c0a4431bfc24bbac6b8df81d1e9962a81ea0..da758b813687b1539e8181845ef12b36b8080bd6 100644
--- a/ui/file_manager/gallery/js/image_editor/image_util.js
+++ b/ui/file_manager/gallery/js/image_editor/image_util.js
@@ -545,6 +545,10 @@ ImageUtil.ImageLoader.prototype.load = function(item, callback, opt_delay) {
// Obtain target URL.
if (FileType.isRaw(entry)) {
+ var timestamp =
+ item.getMetadataItem() &&
+ item.getMetadataItem().modificationTime &&
+ item.getMetadataItem().modificationTime.getTime();
ImageLoaderClient.getInstance().load(entry.toURL(), function(result) {
if (result.status === 'success')
loadImage(result.data);
@@ -552,8 +556,7 @@ ImageUtil.ImageLoader.prototype.load = function(item, callback, opt_delay) {
onError('GALLERY_IMAGE_ERROR');
}, {
cache: true,
- timestamp: item.getMetadataItem().modificationTime &&
- item.getMetadataItem().modificationTime.getTime(),
+ timestamp: timestamp,
priority: 0 // Use highest priority to show main image.
});
return;
« no previous file with comments | « ui/file_manager/gallery/js/gallery_item.js ('k') | ui/file_manager/gallery/js/mosaic_mode.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698