Fix deadlock when loading assets after requesting authorization
This commit is contained in:
parent
12bcf52764
commit
705fbbe343
|
@ -143,7 +143,9 @@ class AssetCollectionViewController: UIViewController, UICollectionViewDelegate
|
|||
switch PHPhotoLibrary.authorizationStatus(for: .readWrite) {
|
||||
case .notDetermined:
|
||||
PHPhotoLibrary.requestAuthorization(for: .readWrite) { (_) in
|
||||
self.loadAssets()
|
||||
DispatchQueue.main.async {
|
||||
self.loadAssets()
|
||||
}
|
||||
}
|
||||
return
|
||||
|
||||
|
|
Loading…
Reference in New Issue