mirror of
https://github.com/immich-app/immich.git
synced 2025-01-16 16:56:46 +01:00
attempt at fix for failing to load pictures
This commit is contained in:
parent
79a780e8d9
commit
a558f0be37
2 changed files with 7 additions and 1 deletions
|
@ -398,7 +398,9 @@ export class AssetStore {
|
||||||
}
|
}
|
||||||
|
|
||||||
async updateOptions(options: AssetStoreOptions) {
|
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);
|
this.setOptions(options);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,8 +74,12 @@
|
||||||
const assetStore = new AssetStore(assetStoreOptions);
|
const assetStore = new AssetStore(assetStoreOptions);
|
||||||
|
|
||||||
$effect(() => {
|
$effect(() => {
|
||||||
|
const change = assetStoreOptions.personId !== data.person.id;
|
||||||
assetStoreOptions.personId = data.person.id;
|
assetStoreOptions.personId = data.person.id;
|
||||||
handlePromiseError(assetStore.updateOptions(assetStoreOptions));
|
handlePromiseError(assetStore.updateOptions(assetStoreOptions));
|
||||||
|
if (change) {
|
||||||
|
assetStore.triggerUpdate();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const assetInteraction = new AssetInteraction();
|
const assetInteraction = new AssetInteraction();
|
||||||
|
|
Loading…
Reference in a new issue