0
1
mirror of https://github.com/radio95-rnt/RadioPlayer.git synced 2026-02-26 13:52:00 +01:00

deselect track on put

This commit is contained in:
2025-12-12 16:50:10 +01:00
parent b9a2ff3015
commit bf980f7b3e

View File

@@ -371,6 +371,8 @@
// Priority 1: Check for a selected file in the subdirectory list
if (selectedSubFile && selectedDir) {
fullPath = subbasePath.replace(/\/$/, '') + '/' + selectedSubFile;
Array.from(document.getElementById("subdir-box").children).forEach(c => c.classList.remove("selected"));
selectedSubFile = null;
} else {
// Priority 2: Check for a selected file in the main directory list
const dirEls = document.getElementById("dirs-box").children;
@@ -381,6 +383,8 @@
// A simple check to see if the selected item is a file
if (name.includes('.')) {
fullPath = basePath.replace(/\/$/, '') + '/' + name;
Array.from(dirEls).forEach(c => c.classList.remove("selected"));
selectedDir = null;
}
}
}