1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-24 08:52:28 +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');
};
const navigateAssetForward = () => {
const navigateAssetForward = (e?: Event) => {
e?.stopPropagation();
const nextAsset = $flattenAssetGroupByDate[selectedIndex + 1];
viewDeviceId = nextAsset.deviceId;
viewAssetId = nextAsset.id;
@ -73,7 +75,9 @@
pushState(viewAssetId);
};
const navigateAssetBackward = () => {
const navigateAssetBackward = (e?: Event) => {
e?.stopPropagation();
const lastAsset = $flattenAssetGroupByDate[selectedIndex - 1];
viewDeviceId = lastAsset.deviceId;
viewAssetId = lastAsset.id;