Fix auto-groups state cleanup on search reset and manual search
Clear _autoGroupFilePaths and re-show groups section on album search reset. Hide auto-groups section during manual search.
This commit is contained in:
parent
a7bef972e0
commit
cc96af2cb1
1 changed files with 8 additions and 0 deletions
|
|
@ -54678,6 +54678,8 @@ async function importPageSearchAlbum() {
|
||||||
if (!query) return;
|
if (!query) return;
|
||||||
|
|
||||||
document.getElementById('import-page-suggestions').style.display = 'none';
|
document.getElementById('import-page-suggestions').style.display = 'none';
|
||||||
|
const groupsEl = document.getElementById('import-page-auto-groups');
|
||||||
|
if (groupsEl) groupsEl.style.display = 'none';
|
||||||
const grid = document.getElementById('import-page-album-results');
|
const grid = document.getElementById('import-page-album-results');
|
||||||
grid.innerHTML = '<div style="color:#888;text-align:center;padding:20px;">Searching...</div>';
|
grid.innerHTML = '<div style="color:#888;text-align:center;padding:20px;">Searching...</div>';
|
||||||
|
|
||||||
|
|
@ -54974,6 +54976,7 @@ function importPageResetAlbumSearch() {
|
||||||
importPageState.albumData = null;
|
importPageState.albumData = null;
|
||||||
importPageState.matchOverrides = {};
|
importPageState.matchOverrides = {};
|
||||||
importPageState.tapSelectedChip = null;
|
importPageState.tapSelectedChip = null;
|
||||||
|
importPageState._autoGroupFilePaths = null;
|
||||||
|
|
||||||
document.getElementById('import-page-album-search-section').classList.remove('hidden');
|
document.getElementById('import-page-album-search-section').classList.remove('hidden');
|
||||||
document.getElementById('import-page-album-match-section').classList.add('hidden');
|
document.getElementById('import-page-album-match-section').classList.add('hidden');
|
||||||
|
|
@ -54983,7 +54986,12 @@ function importPageResetAlbumSearch() {
|
||||||
document.getElementById('import-page-album-search-input').value = '';
|
document.getElementById('import-page-album-search-input').value = '';
|
||||||
document.getElementById('import-page-album-clear-btn').classList.add('hidden');
|
document.getElementById('import-page-album-clear-btn').classList.add('hidden');
|
||||||
|
|
||||||
|
// Re-show auto-groups
|
||||||
|
const groupsEl = document.getElementById('import-page-auto-groups');
|
||||||
|
if (groupsEl) groupsEl.style.display = '';
|
||||||
|
|
||||||
// Refresh suggestions & staging
|
// Refresh suggestions & staging
|
||||||
|
importPageLoadAutoGroups();
|
||||||
importPageLoadSuggestions();
|
importPageLoadSuggestions();
|
||||||
importPageRefreshStaging();
|
importPageRefreshStaging();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue