close album if empty after operation
This commit is contained in:
parent
669fb33b67
commit
c04794f26e
1 changed files with 19 additions and 1 deletions
|
@ -836,7 +836,17 @@ export default function Gallery() {
|
|||
selected.collectionID
|
||||
);
|
||||
}
|
||||
|
||||
if (selected?.ownCount === filteredData?.length) {
|
||||
if (
|
||||
ops === COLLECTION_OPS_TYPE.REMOVE ||
|
||||
ops === COLLECTION_OPS_TYPE.RESTORE ||
|
||||
ops === COLLECTION_OPS_TYPE.MOVE
|
||||
) {
|
||||
setActiveCollectionID(ALL_SECTION);
|
||||
} else if (ops === COLLECTION_OPS_TYPE.UNHIDE) {
|
||||
exitHiddenSection();
|
||||
}
|
||||
}
|
||||
clearSelection();
|
||||
await syncWithRemote(false, true);
|
||||
} catch (e) {
|
||||
|
@ -873,6 +883,14 @@ export default function Gallery() {
|
|||
setFixCreationTimeAttributes
|
||||
);
|
||||
}
|
||||
if (
|
||||
selected?.ownCount === filteredData?.length &&
|
||||
ops !== FILE_OPS_TYPE.ARCHIVE &&
|
||||
ops !== FILE_OPS_TYPE.DOWNLOAD &&
|
||||
ops !== FILE_OPS_TYPE.FIX_TIME
|
||||
) {
|
||||
setActiveCollectionID(ALL_SECTION);
|
||||
}
|
||||
clearSelection();
|
||||
await syncWithRemote(false, true);
|
||||
} catch (e) {
|
||||
|
|
Loading…
Add table
Reference in a new issue