mirror of
https://github.com/immich-app/immich.git
synced 2025-05-24 01:12:58 -04:00
fix(web): multi-select (#18485)
This commit is contained in:
parent
065f7c7d5d
commit
c7dc31151d
@ -564,12 +564,9 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Select/deselect assets in range (start,end]
|
// Select/deselect assets in range (start,end)
|
||||||
let started = false;
|
let started = false;
|
||||||
for (const bucket of assetStore.buckets) {
|
for (const bucket of assetStore.buckets) {
|
||||||
if (bucket === startBucket) {
|
|
||||||
started = true;
|
|
||||||
}
|
|
||||||
if (bucket === endBucket) {
|
if (bucket === endBucket) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -583,27 +580,31 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (bucket === startBucket) {
|
||||||
|
started = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update date group selection
|
// Update date group selection in range [start,end]
|
||||||
started = false;
|
started = false;
|
||||||
for (const bucket of assetStore.buckets) {
|
for (const bucket of assetStore.buckets) {
|
||||||
if (bucket === startBucket) {
|
if (bucket === startBucket) {
|
||||||
started = true;
|
started = true;
|
||||||
}
|
}
|
||||||
|
if (started) {
|
||||||
|
// Split bucket into date groups and check each group
|
||||||
|
for (const dateGroup of bucket.dateGroups) {
|
||||||
|
const dateGroupTitle = dateGroup.groupTitle;
|
||||||
|
if (dateGroup.getAssets().every((a) => assetInteraction.hasSelectedAsset(a.id))) {
|
||||||
|
assetInteraction.addGroupToMultiselectGroup(dateGroupTitle);
|
||||||
|
} else {
|
||||||
|
assetInteraction.removeGroupFromMultiselectGroup(dateGroupTitle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
if (bucket === endBucket) {
|
if (bucket === endBucket) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Split bucket into date groups and check each group
|
|
||||||
for (const dateGroup of bucket.dateGroups) {
|
|
||||||
const dateGroupTitle = dateGroup.groupTitle;
|
|
||||||
if (dateGroup.getAssets().every((a) => assetInteraction.hasSelectedAsset(a.id))) {
|
|
||||||
assetInteraction.addGroupToMultiselectGroup(dateGroupTitle);
|
|
||||||
} else {
|
|
||||||
assetInteraction.removeGroupFromMultiselectGroup(dateGroupTitle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user