Skip to content

Commit

Permalink
Merge pull request #244 from waifuvault/fsbox-fix
Browse files Browse the repository at this point in the history
prevent fslightbox from loading every image
  • Loading branch information
VictoriqueMoe authored Feb 18, 2025
2 parents a3a7b89 + e8d4cfe commit b315f7a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/public/assets/custom/js/album.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,11 @@ Site.loadPage(async site => {
return iconMap.get(key) ?? iconMap.get(mime) ?? defaultIcon;
}

function reloadLightbox(){
refreshFsLightbox();
fsLightbox.props.loadOnlyCurrentSource = true;
}

function renderAlbum(album, viewMode) {
albumNameElt.innerText = album.name;
if (album.files.length === 0) {
Expand All @@ -130,7 +135,7 @@ Site.loadPage(async site => {
case "card":
renderCard(album);
window.location.hash = "card";
refreshFsLightbox();
reloadLightbox();
}


Expand Down

0 comments on commit b315f7a

Please sign in to comment.