fix archived collection hidden from all section

This commit is contained in:
Abhinav 2023-05-17 15:30:58 +05:30
parent 095abf71da
commit 6dafd9bd03

View file

@ -344,7 +344,7 @@ export default function Gallery() {
}, [isInSearchMode, searchResultSummary]);
const filteredData = useMemoSingleThreaded((): EnteFile[] => {
if (!files || !user || !trashedFiles) {
if (!files || !user || !trashedFiles || !archivedCollections) {
return [];
}
@ -417,7 +417,7 @@ export default function Gallery() {
}
// archived collections files can only be seen in their respective collection
if (archivedCollections?.has(item.id)) {
if (archivedCollections.has(item.collectionID)) {
if (activeCollection === item.collectionID) {
return true;
} else {
@ -460,6 +460,7 @@ export default function Gallery() {
search?.thing,
search?.text,
activeCollection,
archivedCollections,
]);
const fileToCollectionsMap = useMemoSingleThreaded(() => {