Fix automatic gallery refresh after image import
- Changed updateImageGalleryControls() to loadImageGallery() in import handlers - Now gallery refreshes automatically after importing task or consequence images - Also fixed scan button to refresh gallery after directory scanning - No more need to navigate away and back to see newly imported images Gallery now updates immediately showing: - Newly imported images in the correct category tabs - Updated image counts and selections - Real-time visual feedback for successful imports
This commit is contained in:
parent
45adf1b757
commit
ba4e532322
6
game.js
6
game.js
|
|
@ -947,7 +947,7 @@ class TaskChallengeGame {
|
|||
newImportTaskBtn.addEventListener('click', async () => {
|
||||
if (this.fileManager) {
|
||||
await this.fileManager.selectAndImportImages('task');
|
||||
this.updateImageGalleryControls('task');
|
||||
this.loadImageGallery(); // Refresh the gallery to show new images
|
||||
} else {
|
||||
this.showNotification('Desktop file manager not available', 'warning');
|
||||
}
|
||||
|
|
@ -960,7 +960,7 @@ class TaskChallengeGame {
|
|||
newImportConsequenceBtn.addEventListener('click', async () => {
|
||||
if (this.fileManager) {
|
||||
await this.fileManager.selectAndImportImages('consequence');
|
||||
this.updateImageGalleryControls('consequence');
|
||||
this.loadImageGallery(); // Refresh the gallery to show new images
|
||||
} else {
|
||||
this.showNotification('Desktop file manager not available', 'warning');
|
||||
}
|
||||
|
|
@ -994,7 +994,7 @@ class TaskChallengeGame {
|
|||
if (this.fileManager) {
|
||||
// Use desktop file manager scanning
|
||||
await this.fileManager.scanAllDirectories();
|
||||
this.updateImageGalleryControls('task');
|
||||
this.loadImageGallery(); // Refresh the gallery to show scanned images
|
||||
} else {
|
||||
// Fallback to web scanning
|
||||
this.scanForNewImages();
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
Loading…
Reference in New Issue