mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-26 00:14:40 -04:00 
			
		
		
		
	fix(web): prevent new uploads from temporarily showing in trash (#10348)
This commit is contained in:
		
							parent
							
								
									aea1c46bea
								
							
						
					
					
						commit
						dfad4f0ff4
					
				| @ -202,6 +202,15 @@ describe('AssetStore', () => { | |||||||
|       expect(updateAssetsSpy).toBeCalledWith([asset]); |       expect(updateAssetsSpy).toBeCalledWith([asset]); | ||||||
|       expect(assetStore.assets.length).toEqual(1); |       expect(assetStore.assets.length).toEqual(1); | ||||||
|     }); |     }); | ||||||
|  | 
 | ||||||
|  |     it('ignores trashed assets when isTrashed is true', () => { | ||||||
|  |       const asset = assetFactory.build({ isTrashed: false }); | ||||||
|  |       const trashedAsset = assetFactory.build({ isTrashed: true }); | ||||||
|  | 
 | ||||||
|  |       const assetStore = new AssetStore({ isTrashed: true }); | ||||||
|  |       assetStore.addAssets([asset, trashedAsset]); | ||||||
|  |       expect(assetStore.assets).toEqual([trashedAsset]); | ||||||
|  |     }); | ||||||
|   }); |   }); | ||||||
| 
 | 
 | ||||||
|   describe('updateAssets', () => { |   describe('updateAssets', () => { | ||||||
|  | |||||||
| @ -326,7 +326,8 @@ export class AssetStore { | |||||||
|         this.options.personId || |         this.options.personId || | ||||||
|         this.options.albumId || |         this.options.albumId || | ||||||
|         isMismatched(this.options.isArchived, asset.isArchived) || |         isMismatched(this.options.isArchived, asset.isArchived) || | ||||||
|         isMismatched(this.options.isFavorite, asset.isFavorite) |         isMismatched(this.options.isFavorite, asset.isFavorite) || | ||||||
|  |         isMismatched(this.options.isTrashed, asset.isTrashed) | ||||||
|       ) { |       ) { | ||||||
|         // If asset is already in the bucket we don't need to recalculate
 |         // If asset is already in the bucket we don't need to recalculate
 | ||||||
|         // asset store containers
 |         // asset store containers
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user