Dr0ptp4kt has submitted this change and it was merged.
Change subject: Fix for image gallery sometimes not immediately showing cached
file.
......................................................................
Fix for image gallery sometimes not immediately showing cached file.
Change-Id: If4b8dda5310e89c1427579c19eb746d18a756257
---
M wikipedia/View Controllers/Image Gallery/WMFImageGalleryViewController.m
1 file changed, 3 insertions(+), 1 deletion(-)
Approvals:
Dr0ptp4kt: Looks good to me, approved
Mhurd: Looks good to me, but someone else must approve
diff --git a/wikipedia/View Controllers/Image
Gallery/WMFImageGalleryViewController.m b/wikipedia/View Controllers/Image
Gallery/WMFImageGalleryViewController.m
index 7f6c4b8..3b0d1f9 100644
--- a/wikipedia/View Controllers/Image Gallery/WMFImageGalleryViewController.m
+++ b/wikipedia/View Controllers/Image Gallery/WMFImageGalleryViewController.m
@@ -545,7 +545,9 @@
} else {
ImgGalleryLog(@"Using article image (%@) as placeholder for thumbnail
of cell %@", image.sourceURL, indexPath);
// !!!: -asUIImage reads from disk AND has to decompress image data,
maybe we should move it off the main thread?
- cell.image = [image asUIImage];
+ // use largestCachedVariant to ensure that we grab any image that's
available
+ // TODO: make sure don't grab an image that's _too_ big, as it might
effect scrolling performance
+ cell.image = [[image largestCachedVariant] asUIImage];
cell.imageSize = infoForImage ? infoForImage.thumbSize :
cell.image.size;
[self fetchImage:infoForImage.imageThumbURL
forCellAtIndexPath:indexPath];
}
--
To view, visit https://gerrit.wikimedia.org/r/197716
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If4b8dda5310e89c1427579c19eb746d18a756257
Gerrit-PatchSet: 4
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd <[email protected]>
Gerrit-Reviewer: Bgerstle <[email protected]>
Gerrit-Reviewer: Dr0ptp4kt <[email protected]>
Gerrit-Reviewer: Mhurd <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits