mirror of
https://github.com/immich-app/immich.git
synced 2025-11-23 23:00:42 +09:00
chore: migrate away from event dispatcher (#12820)
This commit is contained in:
@@ -151,15 +151,15 @@
|
||||
<AssetViewer
|
||||
asset={$viewingAsset}
|
||||
showNavigation={assets.length > 1}
|
||||
on:next={() => {
|
||||
onNext={() => {
|
||||
const index = getAssetIndex($viewingAsset.id) + 1;
|
||||
setAsset(assets[index % assets.length]);
|
||||
}}
|
||||
on:previous={() => {
|
||||
onPrevious={() => {
|
||||
const index = getAssetIndex($viewingAsset.id) - 1 + assets.length;
|
||||
setAsset(assets[index % assets.length]);
|
||||
}}
|
||||
on:close={() => {
|
||||
onClose={() => {
|
||||
assetViewingStore.showAssetViewer(false);
|
||||
handlePromiseError(navigate({ targetRoute: 'current', assetId: null }));
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user