fix(web): timeline regression 2 (#16982)

* fix(web): timeline renders nothing after archiving in asset viewer

* fix(web): timeline renders nothing after archiving in asset viewer

* fix: ensure geometry updated when performing bulk action on all

* fix: album assets selection
This commit is contained in:
Alex 2025-03-20 22:30:27 -05:00 committed by GitHub
parent dbc279f843
commit bcd9248b43
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 10 additions and 6 deletions

View file

@ -1,6 +1,6 @@
<script lang="ts">
import { shortcut } from '$lib/actions/shortcut';
import type { OnAction } from '$lib/components/asset-viewer/actions/action';
import type { OnAction, PreAction } from '$lib/components/asset-viewer/actions/action';
import MenuOption from '$lib/components/shared-components/context-menu/menu-option.svelte';
import { AssetAction } from '$lib/constants';
import { toggleArchive } from '$lib/utils/asset-utils';
@ -11,11 +11,15 @@
interface Props {
asset: AssetResponseDto;
onAction: OnAction;
preAction: PreAction;
}
let { asset, onAction }: Props = $props();
let { asset, onAction, preAction }: Props = $props();
const onArchive = async () => {
if (!asset.isArchived) {
preAction({ type: AssetAction.ARCHIVE, asset });
}
const updatedAsset = await toggleArchive(asset);
if (updatedAsset) {
onAction({ type: asset.isArchived ? AssetAction.ARCHIVE : AssetAction.UNARCHIVE, asset });

View file

@ -181,7 +181,7 @@
{#if asset.type === AssetTypeEnum.Image}
<SetProfilePictureAction {asset} />
{/if}
<ArchiveAction {asset} {onAction} />
<ArchiveAction {asset} {onAction} {preAction} />
<MenuOption
icon={mdiUpload}
onClick={() => openFileUploadDialog({ multiple: false, assetId: asset.id })}