mirror of
https://github.com/immich-app/immich.git
synced 2025-01-01 08:31:59 +00:00
fix(web): unstacking issues (#4792)
* Fix typo * Restore asset store consistency after unstacking * Fix aspect ratio after unstacking
This commit is contained in:
parent
92bb42950e
commit
38443a6068
4 changed files with 9 additions and 7 deletions
|
@ -109,7 +109,9 @@ export class AssetRepository implements IAssetRepository {
|
|||
faces: {
|
||||
person: true,
|
||||
},
|
||||
stack: true,
|
||||
stack: {
|
||||
exifInfo: true,
|
||||
},
|
||||
},
|
||||
// We are specifically asking for this asset. Return it even if it is soft deleted
|
||||
withDeleted: true,
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
export let showDownloadButton: boolean;
|
||||
export let showDetailButton: boolean;
|
||||
export let showSlideshow = false;
|
||||
export let hasStackChildern = false;
|
||||
export let hasStackChildren = false;
|
||||
|
||||
$: isOwner = asset.ownerId === $page.data.user?.id;
|
||||
|
||||
|
@ -176,7 +176,7 @@
|
|||
/>
|
||||
<MenuOption on:click={() => onMenuClick('asProfileImage')} text="As profile picture" />
|
||||
|
||||
{#if hasStackChildern}
|
||||
{#if hasStackChildren}
|
||||
<MenuOption on:click={() => onMenuClick('unstack')} text="Un-Stack" />
|
||||
{/if}
|
||||
|
||||
|
|
|
@ -549,7 +549,7 @@
|
|||
}
|
||||
asset.stackCount = 0;
|
||||
asset.stack = [];
|
||||
assetStore?.updateAsset(asset);
|
||||
assetStore?.updateAsset(asset, true);
|
||||
|
||||
dispatch('unstack');
|
||||
notificationController.show({ type: NotificationType.Info, message: 'Un-stacked', timeout: 1500 });
|
||||
|
@ -575,7 +575,7 @@
|
|||
showDownloadButton={shouldShowDownloadButton}
|
||||
showDetailButton={shouldShowDetailButton}
|
||||
showSlideshow={!!assetStore}
|
||||
hasStackChildern={$stackAssetsStore.length > 0}
|
||||
hasStackChildren={$stackAssetsStore.length > 0}
|
||||
on:goBack={closeViewer}
|
||||
on:showDetail={showDetailInfoHandler}
|
||||
on:download={() => downloadFile(asset)}
|
||||
|
|
|
@ -317,7 +317,7 @@ export class AssetStore {
|
|||
return bucket.assets[Math.floor(Math.random() * bucket.assets.length)] || null;
|
||||
}
|
||||
|
||||
updateAsset(_asset: AssetResponseDto) {
|
||||
updateAsset(_asset: AssetResponseDto, recalculate = false) {
|
||||
const asset = this.assets.find((asset) => asset.id === _asset.id);
|
||||
if (!asset) {
|
||||
return;
|
||||
|
@ -325,7 +325,7 @@ export class AssetStore {
|
|||
|
||||
Object.assign(asset, _asset);
|
||||
|
||||
this.emit(false);
|
||||
this.emit(recalculate);
|
||||
}
|
||||
|
||||
removeAssets(ids: string[]) {
|
||||
|
|
Loading…
Reference in a new issue