fix(web): prevent fetching asset info twice (#8486)

This commit is contained in:
Michel Heusschen
2024-04-04 03:20:54 +02:00
committed by GitHub
parent 0529076ed7
commit 66650f5944
8 changed files with 47 additions and 61 deletions
@@ -82,7 +82,7 @@
export let data: PageData;
let { isViewing: showAssetViewer, setAssetId } = assetViewingStore;
let { isViewing: showAssetViewer, setAsset } = assetViewingStore;
let { slideshowState, slideshowNavigation } = slideshowStore;
$: album = data.album;
@@ -231,7 +231,7 @@
const asset =
$slideshowNavigation === SlideshowNavigation.Shuffle ? await assetStore.getRandomAsset() : assetStore.assets[0];
if (asset) {
await setAssetId(asset.id);
setAsset(asset);
$slideshowState = SlideshowState.PlaySlideshow;
}
};