fix(section/favorite): ensure select-all-checkbox is wired

This commit is contained in:
Edouard Vanbelle
2026-04-16 00:16:40 +02:00
parent 3276da366c
commit 8e18e0c848
3 changed files with 6 additions and 2 deletions
-1
View File
@@ -12,7 +12,6 @@ export const app = {
contextMenuTargetFile: null, contextMenuTargetFile: null,
selectedTargetFolderId: '', selectedTargetFolderId: '',
moveDialogMode: 'file', moveDialogMode: 'file',
currentSection: null, // will be defined on first call currentSection: null, // will be defined on first call
isSearchMode: false, isSearchMode: false,
shareDialogItem: null, shareDialogItem: null,
+1 -1
View File
@@ -256,7 +256,7 @@ const multiSelect = {
// Sync individual item checkboxes // Sync individual item checkboxes
this._syncItemCheckboxes(); this._syncItemCheckboxes();
// Sync select-all checkbox state (for non-selection-mode) // Sync select-all checkbox state (for non-selection-mode)
if (!this._barVisible) this._syncSelectAllCheckbox(); this._syncSelectAllCheckbox();
}, },
/** Wire click handlers on batch action buttons (idempotent per render) */ /** Wire click handlers on batch action buttons (idempotent per render) */
+5
View File
@@ -9,6 +9,7 @@
import { ui } from '../../app/ui.js'; import { ui } from '../../app/ui.js';
import { getCsrfHeaders } from '../../core/csrf.js'; import { getCsrfHeaders } from '../../core/csrf.js';
import { i18n } from '../../core/i18n.js'; import { i18n } from '../../core/i18n.js';
import { multiSelect } from '../files/multiSelect.js';
const favorites = { const favorites = {
/** @type {Map<string, object>} key = "file:<id>" | "folder:<id>" */ /** @type {Map<string, object>} key = "file:<id>" | "folder:<id>" */
@@ -172,6 +173,10 @@ const favorites = {
} }
ui.resetFilesList(); // ensure also list visible & error hidden ui.resetFilesList(); // ensure also list visible & error hidden
// wire buttons & select-all-checkbox as list header has changed in ui.resetFilesList()
// FIXME: this case is not easy to understand, should apply better implementation
multiSelect.init();
ui.updateBreadcrumb(''); ui.updateBreadcrumb('');
if (this._cache.size === 0) { if (this._cache.size === 0) {