fetchImageWithURL: returns Wikipedia.WMFImageDownload instead of image in then block
Closed, ResolvedPublic


The following code sometimes results in a Wikipedia.WMFImageDownload being passed to the then block instead of an image

[[WMFImageController sharedInstance] fetchImageWithURL:imageURL]
.then(^id (UIImage* image) {
    if ([self.imageURL isEqual:imageURL]) {
        self.imageView.image = image;
    return nil;
.catch(^(NSError* error){
    //TODO: Show placeholder
Fjalapeno updated the task description. (Show Details)
Fjalapeno raised the priority of this task from to Needs Triage.
Fjalapeno added subscribers: Fjalapeno, BGerstle-WMF.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 19 2015, 11:49 PM

Ahh - looks like the API changed to return a different type… swift gives us type safety and promise kit takes it away.

BGerstle-WMF closed this task as Resolved.Jan 26 2016, 7:10 PM
BGerstle-WMF claimed this task.
Restricted Application added a subscriber: StudiesWorld. · View Herald TranscriptJan 26 2016, 7:10 PM