Skip to content

Commit

Permalink
Removed unnecessary KingfisherOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
vfn committed Jul 9, 2015
1 parent fee63e8 commit dc01e03
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions Kingfisher/KingfisherManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,18 +114,13 @@ public class KingfisherManager {
func parseOptionsInfo(optionsInfo: KingfisherOptionsInfo?) -> (Options, ImageCache, ImageDownloader) {
let options: Options
if let optionsInOptionsInfo = optionsInfo?[.Options] as? KingfisherOptions {
options = (forceRefresh: (optionsInOptionsInfo & KingfisherOptions.ForceRefresh) != KingfisherOptions.None,
lowPriority: (optionsInOptionsInfo & KingfisherOptions.LowPriority) != KingfisherOptions.None,
cacheMemoryOnly: (optionsInOptionsInfo & KingfisherOptions.CacheMemoryOnly) != KingfisherOptions.None,
shouldDecode: (optionsInOptionsInfo & KingfisherOptions.BackgroundDecode) != KingfisherOptions.None,
queue: dispatch_get_main_queue())
options = (forceRefresh: (optionsInOptionsInfo & .ForceRefresh) != .None,
lowPriority: (optionsInOptionsInfo & .LowPriority) != .None,
cacheMemoryOnly: (optionsInOptionsInfo & .CacheMemoryOnly) != .None,
shouldDecode: (optionsInOptionsInfo & .BackgroundDecode) != .None,
queue: KingfisherManager.OptionsNone.queue)
} else {
options = (forceRefresh: false,
lowPriority: false,
cacheMemoryOnly: false,
shouldDecode: false,
queue: dispatch_get_main_queue()
)
options = KingfisherManager.OptionsNone
}

let targetCache = optionsInfo?[.TargetCache] as? ImageCache ?? self.cache
Expand Down

0 comments on commit dc01e03

Please sign in to comment.