mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 09:12:57 +02:00
fix(web): update stack state in timeline (#17021)
* fix(web): update stack state in timeline * js docs * fix: handle state update from unstack action from gallery viewer * use navigate in View Stack notification --------- Co-authored-by: Snowknight26 <Snowknight26@users.noreply.github.com>
This commit is contained in:
parent
b00da18e84
commit
b5d5c40c69
5 changed files with 78 additions and 22 deletions
web/src/lib/components/photos-page
|
@ -9,7 +9,7 @@
|
|||
import { isSearchEnabled } from '$lib/stores/search.store';
|
||||
import { featureFlags } from '$lib/stores/server-config.store';
|
||||
import { handlePromiseError } from '$lib/utils';
|
||||
import { deleteAssets } from '$lib/utils/actions';
|
||||
import { deleteAssets, updateStackedAssetInTimeline, updateUnstackedAssetInTimeline } from '$lib/utils/actions';
|
||||
import { archiveAssets, cancelMultiselect, selectAllAssets, stackAssets } from '$lib/utils/asset-utils';
|
||||
import { navigate } from '$lib/utils/navigation';
|
||||
import { type ScrubberListener } from '$lib/utils/timeline-util';
|
||||
|
@ -310,11 +310,11 @@
|
|||
};
|
||||
|
||||
const onStackAssets = async () => {
|
||||
const ids = await stackAssets(assetInteraction.selectedAssets);
|
||||
if (ids) {
|
||||
assetStore.removeAssets(ids);
|
||||
onEscape();
|
||||
}
|
||||
const result = await stackAssets(assetInteraction.selectedAssets);
|
||||
|
||||
updateStackedAssetInTimeline(assetStore, result);
|
||||
|
||||
onEscape();
|
||||
};
|
||||
|
||||
const toggleArchive = async () => {
|
||||
|
@ -411,7 +411,7 @@
|
|||
}
|
||||
|
||||
case AssetAction.UNSTACK: {
|
||||
assetStore.addAssets(action.assets);
|
||||
updateUnstackedAssetInTimeline(assetStore, action.assets);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue