Commit 129a9488 by Sarkizz

修正图片多选逻辑

parent 56048b7e
......@@ -167,7 +167,7 @@ extension MRAlbumListViewController {
size: CGSize? = nil,
inQueue: DispatchQueue = DispatchQueue.global(),
progress: ((_ progress: Float) -> Void)? = nil,
completion:@escaping (_ images: [UIImage]?, _ failedCount: Int, _ error: String?) -> Void) {
completion:@escaping (_ images: [UIImage], _ failedCount: Int) -> Void) {
var count = 0
var failedCount = 0
......@@ -190,7 +190,7 @@ extension MRAlbumListViewController {
progress?(Float(count/assests.count))
if count <= 0 {
completion(images, failedCount, nil)
completion(images, failedCount)
}
}
}
......
......@@ -20,14 +20,9 @@ public class SAMutableSelectionAlbum: MRAlbumListViewController {
public override func confirm() {
ToastView.loading()
requestImages(with: selectedAssests, size: maxImageSize) { (images, count, error) in
requestImages(with: selectedAssests, size: maxImageSize) { (images, count) in
ToastView.hide(animate: false)
if let images = images {
self.didFinish?(self, images, count)
} else {
let error = error ?? "获取图片失败"
ToastView.show(error)
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment