mirror of
https://github.com/immich-app/immich.git
synced 2024-12-29 15:11:58 +00:00
fix(web): prevent new uploads from temporarily showing in trash (#10348)
This commit is contained in:
parent
aea1c46bea
commit
dfad4f0ff4
2 changed files with 11 additions and 1 deletions
|
@ -202,6 +202,15 @@ describe('AssetStore', () => {
|
|||
expect(updateAssetsSpy).toBeCalledWith([asset]);
|
||||
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', () => {
|
||||
|
|
|
@ -326,7 +326,8 @@ export class AssetStore {
|
|||
this.options.personId ||
|
||||
this.options.albumId ||
|
||||
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
|
||||
// asset store containers
|
||||
|
|
Loading…
Reference in a new issue