fix(control): deselect files from displays which were deselected

This commit is contained in:
E44
2025-11-22 23:57:46 +01:00
parent 79ca11300a
commit c1afc20658
3 changed files with 22 additions and 6 deletions
@@ -11,6 +11,7 @@
import type { Display, MenuOption } from '../ts/types';
import { is_selected, select, selected_display_ids } from '../ts/stores/select';
import { update_screenshot } from '../ts/stores/displays';
import { filter_file_selection_for_current_selected_displays } from '../ts/stores/files';
let { display, get_display_menu_options, close_pinned_display } = $props<{
display: Display;
@@ -22,6 +23,7 @@
function onclick(e: Event) {
select(selected_display_ids, display.id);
filter_file_selection_for_current_selected_displays();
e.stopPropagation();
}
@@ -22,7 +22,7 @@
get_current_folder_elements,
get_display_ids_where_file_is_missing,
get_display_ids_where_path_does_not_exist,
get_file_from_id,
get_file_by_id,
get_longest_existing_path_and_needed_parts,
run_for_selected_files_on_selected_displays,
update_current_folder_on_selected_displays
@@ -145,7 +145,7 @@
>
<div class="flex flex-col gap-2 overflow-auto h-full min-h-0 grow-0">
{#each $selected_file_ids
.map((file_id) => get_file_from_id(file_id, $all_files, $current_file_path))
.map((file_id) => get_file_by_id(file_id, $all_files, $current_file_path))
.filter((element) => element !== null) as file}
<FolderElementObject {file} not_interactable />
{/each}