File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -29,3 +29,4 @@ android/*.iml
29
29
android /local.properties
30
30
android /.settings
31
31
android /.project
32
+ Session.vim
Original file line number Diff line number Diff line change @@ -758,7 +758,12 @@ + (BOOL)requiresMainQueueSetup
758
758
CGSize size = CGSizeMake (width, height);
759
759
760
760
NSURL * url = [NSURL URLWithString: imageUri];
761
- PHFetchResult *results = [PHAsset fetchAssetsWithALAssetURLs: @[url] options: nil ];
761
+ PHFetchResult *results = nil ;
762
+ if ([url.scheme isEqualToString: @" ph" ]) {
763
+ results = [PHAsset fetchAssetsWithLocalIdentifiers: @[[imageUri substringFromIndex: 5 ]] options: nil ];
764
+ } else {
765
+ results = [PHAsset fetchAssetsWithALAssetURLs: @[url] options: nil ];
766
+ }
762
767
763
768
if (results.count == 0 ) {
764
769
NSString *errorText = [NSString stringWithFormat: @" Failed to fetch PHAsset with local identifier %@ with no error message." , imageUri];
You can’t perform that action at this time.
0 commit comments