Skip to content

Commit cb0fa40

Browse files
Merge pull request #1144 from tchapgouv/1143-peu-d-images-recentes-depuis-ios-18
Réactiver l'affichage des albums dans le sélecteur de media sous iOS 18
2 parents 985d729 + cf31d81 commit cb0fa40

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Riot/Modules/MediaPicker/MediaPickerViewController.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,11 @@ - (void)reloadUserLibraryAlbums
392392
MXStrongifyAndReturnIfNil(self);
393393

394394
// List user albums which are not empty
395-
PHFetchResult *albums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeAlbumRegular options:nil];
396-
395+
// Tchap: starting from iOS 18, select any subtype albums rather than regular ones else no album is listed (only a few recents photos)
396+
// Maybe because 'smart' albums get a full revamp in iOS 18?
397+
// PHFetchResult *albums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeAlbumRegular options:nil];
398+
PHFetchResult *albums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeAny options:nil];
399+
397400
NSMutableArray *updatedUserAlbums = [NSMutableArray array];
398401
__block PHAssetCollection *cameraRollAlbum, *videoAlbum;
399402

changelog.d/1143.bugfix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Réactiver l'affichage des albums dans le sélecteur de media sous iOS 18.

0 commit comments

Comments
 (0)