diff --git a/src/scripts/lychee.js b/src/scripts/lychee.js index 04123ac..ad3b7ee 100644 --- a/src/scripts/lychee.js +++ b/src/scripts/lychee.js @@ -206,6 +206,9 @@ lychee.load = function() { // Trash data photo.json = null; + // Hide sidebar + if (visible.sidebar()) sidebar.toggle(); + // Show Album if (visible.photo()) view.photo.hide(); if (album.json&&albumID==album.json.id) view.album.title(); @@ -223,9 +226,11 @@ lychee.load = function() { album.json = null; photo.json = null; + // Hide sidebar + if (visible.sidebar()) sidebar.toggle(); + // Show Albums if (visible.photo()) view.photo.hide(); - if (visible.sidebar()) sidebar.toggle(); albums.load(); } diff --git a/src/scripts/sidebar.js b/src/scripts/sidebar.js index 06c3be6..e2ca668 100644 --- a/src/scripts/sidebar.js +++ b/src/scripts/sidebar.js @@ -70,7 +70,7 @@ sidebar.toggle = function() { if (visible.sidebar()|| visible.sidebarbutton()) { - header.dom('.button--info').toggleClass('active') + header.dom('.button--info').toggleClass('active'); lychee.content.toggleClass('sidebar'); sidebar.dom().toggleClass('active');