فهرست منبع

Add some comment for future me

onevcat 6 سال پیش
والد
کامیت
884595088a
1فایلهای تغییر یافته به همراه5 افزوده شده و 0 حذف شده
  1. 5 0
      Sources/SwiftUI/ImageBinder.swift

+ 5 - 0
Sources/SwiftUI/ImageBinder.swift

@@ -84,6 +84,11 @@ extension KFImage {
                         self.downloadTask = nil
                         switch result {
                         case .success(let value):
+                            // The normalized version of image is used to solve #1395
+                            // It should be not necessary if SwiftUI.Image can handle resizing correctly when created
+                            // by `Image.init(uiImage:)`. (The orientation information should be already contained in
+                            // a `UIImage`)
+                            // https://github.com/onevcat/Kingfisher/issues/1395
                             self.image = value.image.kf.normalized
                             DispatchQueue.main.async {
                                 self.onSuccessDelegate.call(value)