remove duplicate logic

This commit is contained in:
vcoppe
2024-04-30 22:38:58 +02:00
parent f24a7ba427
commit 8df4e50304
3 changed files with 1 additions and 14 deletions

View File

@@ -14,7 +14,7 @@ export const fileOrder = writable<string[]>([]);
export const selectedFiles = writable<Set<string>>(new Set());
export const selectFiles = writable<{ [key: string]: (fileId?: string) => void }>({});
filestore.subscribe((files) => { // Update selectedFiles if a file is deleted
filestore.subscribe((files) => { // Update selectedFiles automatically when files are deleted (either by action or by undo-redo)
let deletedFileIds: string[] = [];
get(selectedFiles).forEach((fileId) => {
if (!files.find((f) => f._data.id === fileId)) {