forked from shadowfacts/Tusker
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) {
|
switch PHPhotoLibrary.authorizationStatus(for: .readWrite) {
|
||||||
case .notDetermined:
|
case .notDetermined:
|
||||||
PHPhotoLibrary.requestAuthorization(for: .readWrite) { (_) in
|
PHPhotoLibrary.requestAuthorization(for: .readWrite) { (_) in
|
||||||
self.loadAssets()
|
DispatchQueue.main.async {
|
||||||
|
self.loadAssets()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue