Skip to content

Commit

Permalink
Merge pull request #1144 from tchapgouv/1143-peu-d-images-recentes-de…
Browse files Browse the repository at this point in the history
…puis-ios-18

Réactiver l'affichage des albums dans le sélecteur de media sous iOS 18
  • Loading branch information
NicolasBuquet authored Jan 2, 2025
2 parents 985d729 + cf31d81 commit cb0fa40
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Riot/Modules/MediaPicker/MediaPickerViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,11 @@ - (void)reloadUserLibraryAlbums
MXStrongifyAndReturnIfNil(self);

// List user albums which are not empty
PHFetchResult *albums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeAlbumRegular options:nil];

// Tchap: starting from iOS 18, select any subtype albums rather than regular ones else no album is listed (only a few recents photos)
// Maybe because 'smart' albums get a full revamp in iOS 18?
// PHFetchResult *albums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeAlbumRegular options:nil];
PHFetchResult *albums = [PHAssetCollection fetchAssetCollectionsWithType:PHAssetCollectionTypeSmartAlbum subtype:PHAssetCollectionSubtypeAny options:nil];

NSMutableArray *updatedUserAlbums = [NSMutableArray array];
__block PHAssetCollection *cameraRollAlbum, *videoAlbum;

Expand Down
1 change: 1 addition & 0 deletions changelog.d/1143.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Réactiver l'affichage des albums dans le sélecteur de media sous iOS 18.

0 comments on commit cb0fa40

Please sign in to comment.