diff --git a/frontends/etiquette_flask/static/photoclipboard.js b/frontends/etiquette_flask/static/photoclipboard.js index b91df5a..184079b 100644 --- a/frontends/etiquette_flask/static/photoclipboard.js +++ b/frontends/etiquette_flask/static/photoclipboard.js @@ -170,10 +170,6 @@ function on_tray_delete_button(event) var clipboard_line = event.target.parentElement; var photo_id = clipboard_line.dataset.id; photo_clipboard.delete(photo_id); - if (photo_clipboard.size == 0) - { - clipboard_tray_collapse(); - } save_photo_clipboard(); } @@ -188,6 +184,11 @@ function update_clipboard_tray() return; } + if (photo_clipboard.size == 0) + { + clipboard_tray_collapse(); + } + var tray_lines = document.getElementById("clipboard_tray_lines"); if (!clipboard_tray.classList.contains("hidden")) {