Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

downloadCanelledBeforeStarting spell issue? #523

Closed
hi-guy opened this issue Nov 23, 2016 · 3 comments
Closed

downloadCanelledBeforeStarting spell issue? #523

hi-guy opened this issue Nov 23, 2016 · 3 comments

Comments

@hi-guy
Copy link

hi-guy commented Nov 23, 2016

public enum KingfisherError: Int {

    /// badData: The downloaded data is not an image or the data is corrupted.
    case badData = 10000
    
    /// notModified: The remote server responsed a 304 code. No image data downloaded.
    case notModified = 10001
    
    /// The HTTP status code in response is not valid. If an invalid
    /// code error received, you could check the value under `KingfisherErrorStatusCodeKey` 
    /// in `userInfo` to see the code.
    case invalidStatusCode = 10002
    
    /// notCached: The image rquested is not in cache but .onlyFromCache is activated.
    case notCached = 10003
    
    /// The URL is invalid.
    case invalidURL = 20000
    
    /// The downloading task is cancelled before started.
    case downloadCanelledBeforeStarting = 30000
}

maybedownloadCancelledBeforeStarting

@onevcat
Copy link
Owner

onevcat commented Nov 23, 2016

Sure! It is a typo. Will fix it.

@hi-guy
Copy link
Author

hi-guy commented Nov 23, 2016

let processoor = options.processor

var image = imageCache[processoor.identifier]
if image == nil {
	image = processoor.process(item: .data(data), options: options)

	// Add the processed image to cache. 
	// If `image` is nil, nothing will happen (since the key is not existing before).
                    
	imageCache[processoor.identifier] = image
}

processoor 喵大 😂.

@onevcat
Copy link
Owner

onevcat commented Dec 1, 2016

Fixed.

@onevcat onevcat closed this as completed Dec 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants