From 7ed7541a0abe6e4a2dadad18843176bb967b1b80 Mon Sep 17 00:00:00 2001 From: Doug Date: Wed, 11 May 2022 09:23:10 +0100 Subject: [PATCH] Hide the hidden album's thumbnail. --- Riot/Modules/MediaPicker/MediaPickerViewController.m | 5 +++-- changelog.d/6096.bugfix | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 changelog.d/6096.bugfix diff --git a/Riot/Modules/MediaPicker/MediaPickerViewController.m b/Riot/Modules/MediaPicker/MediaPickerViewController.m index b2e2ddc616..e4da94a8d1 100644 --- a/Riot/Modules/MediaPicker/MediaPickerViewController.m +++ b/Riot/Modules/MediaPicker/MediaPickerViewController.m @@ -951,8 +951,9 @@ - (UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(no PHFetchResult *assets = [PHAsset fetchAssetsInAssetCollection:collection options:options]; cell.albumCountLabel.text = [NSString stringWithFormat:@"%tu", assets.count]; - // Report first asset thumbnail (except for 'Recently Deleted' album) - if (assets.count && collection.assetCollectionSubtype != 1000000201) + // Report first asset thumbnail (except for 'Recently Deleted' and 'Hidden' albums) + BOOL isSensitiveCollection = collection.assetCollectionSubtype == 1000000201 || collection.assetCollectionSubtype == PHAssetCollectionSubtypeSmartAlbumAllHidden; + if (assets.count && !isSensitiveCollection) { PHAsset *asset = assets[0]; diff --git a/changelog.d/6096.bugfix b/changelog.d/6096.bugfix new file mode 100644 index 0000000000..37ac793b24 --- /dev/null +++ b/changelog.d/6096.bugfix @@ -0,0 +1 @@ +Media gallery: Don't show a thumbnail for the hidden album.