Move 0-item clipboard collapser to update_clipboard_tray.

This commit is contained in:
voussoir 2018-02-22 13:36:31 -08:00
parent 2adadf9871
commit 4b79308119

View file

@ -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"))
{