Skip to content

Commit

Permalink
fix(web): Fix for failing to load pictures (#14943)
Browse files Browse the repository at this point in the history
* attempt at fix for failing to load pictures

* comments

* remove unused files

---------

Co-authored-by: Alex Tran <[email protected]>
  • Loading branch information
Lukasdotcom and alextran1502 authored Dec 27, 2024
1 parent b91f39d commit 0250a7a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion web/src/lib/stores/assets.store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 0250a7a

Please sign in to comment.