1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-28 09:33:27 +02:00

Fixed event propagation trigger navigating twice (#293)

This commit is contained in:
Alex 2022-07-01 20:49:41 -05:00 committed by GitHub
parent a45d6fdf57
commit 32b847c26e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,7 +63,9 @@
dispatch('close'); dispatch('close');
}; };
const navigateAssetForward = () => { const navigateAssetForward = (e?: Event) => {
e?.stopPropagation();
const nextAsset = $flattenAssetGroupByDate[selectedIndex + 1]; const nextAsset = $flattenAssetGroupByDate[selectedIndex + 1];
viewDeviceId = nextAsset.deviceId; viewDeviceId = nextAsset.deviceId;
viewAssetId = nextAsset.id; viewAssetId = nextAsset.id;
@ -73,7 +75,9 @@
pushState(viewAssetId); pushState(viewAssetId);
}; };
const navigateAssetBackward = () => { const navigateAssetBackward = (e?: Event) => {
e?.stopPropagation();
const lastAsset = $flattenAssetGroupByDate[selectedIndex - 1]; const lastAsset = $flattenAssetGroupByDate[selectedIndex - 1];
viewDeviceId = lastAsset.deviceId; viewDeviceId = lastAsset.deviceId;
viewAssetId = lastAsset.id; viewAssetId = lastAsset.id;