Skip to content

Commit

Permalink
Réactiver l'affichage des albums dans le sélecteur de media sous iOS 18
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasBuquet committed Jan 2, 2025
1 parent 985d729 commit cf31d81
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 cf31d81

Please sign in to comment.