mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-31 10:37:11 -04:00 
			
		
		
		
	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:
		
							parent
							
								
									dbc279f843
								
							
						
					
					
						commit
						bcd9248b43
					
				| @ -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 }); | ||||
|  | ||||
| @ -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 })} | ||||
|  | ||||
| @ -377,7 +377,8 @@ | ||||
|       case removeAction: | ||||
|       case AssetAction.TRASH: | ||||
|       case AssetAction.RESTORE: | ||||
|       case AssetAction.DELETE: { | ||||
|       case AssetAction.DELETE: | ||||
|       case AssetAction.ARCHIVE: { | ||||
|         // find the next asset to show or close the viewer | ||||
|         // eslint-disable-next-line @typescript-eslint/no-unused-expressions | ||||
|         (await handleNext()) || (await handlePrevious()) || (await handleClose({ asset: action.asset })); | ||||
|  | ||||
| @ -1120,7 +1120,6 @@ export class AssetStore { | ||||
|         } | ||||
|         if (changedGeometry) { | ||||
|           changedBuckets.add(bucket); | ||||
|           break; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|  | ||||
| @ -435,7 +435,7 @@ | ||||
|   }); | ||||
|   const isShared = $derived(viewMode === AlbumPageViewMode.SELECT_ASSETS ? false : album.albumUsers.length > 0); | ||||
|   const isSelectionMode = $derived( | ||||
|     viewMode === AlbumPageViewMode.SELECT_ASSETS ? false : viewMode === AlbumPageViewMode.SELECT_THUMBNAIL, | ||||
|     viewMode === AlbumPageViewMode.SELECT_ASSETS ? true : viewMode === AlbumPageViewMode.SELECT_THUMBNAIL, | ||||
|   ); | ||||
|   const singleSelect = $derived( | ||||
|     viewMode === AlbumPageViewMode.SELECT_ASSETS ? false : viewMode === AlbumPageViewMode.SELECT_THUMBNAIL, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user