1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2024-12-29 15:11:58 +00:00

fix(web): Fix for failing to load pictures (#14943)

* attempt at fix for failing to load pictures

* comments

* remove unused files

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
Lukas 2024-12-27 11:16:07 -05:00 committed by GitHub
parent b91f39d1af
commit 0250a7a23a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View file

@ -398,7 +398,9 @@ export class AssetStore {
}
async updateOptions(options: AssetStoreOptions) {
if (!this.initialized) {
// Make sure to re-initialize if the personId changes
const needsReinitializing = this.options.personId !== options.personId;
if (!this.initialized && !needsReinitializing) {
this.setOptions(options);
return;
}

View file

@ -74,8 +74,13 @@
const assetStore = new AssetStore(assetStoreOptions);
$effect(() => {
// Check to trigger rebuild the timeline when navigating between people from the info panel
const change = assetStoreOptions.personId !== data.person.id;
assetStoreOptions.personId = data.person.id;
handlePromiseError(assetStore.updateOptions(assetStoreOptions));
if (change) {
assetStore.triggerUpdate();
}
});
const assetInteraction = new AssetInteraction();