diff --git a/app/src/composables/use-preset/use-preset.ts b/app/src/composables/use-preset/use-preset.ts index cb7913cfc9..4e66a899a7 100644 --- a/app/src/composables/use-preset/use-preset.ts +++ b/app/src/composables/use-preset/use-preset.ts @@ -5,7 +5,7 @@ import { useCollection } from '@/composables/use-collection'; import { Filter, Preset } from '@/types/'; -export function usePreset(collection: Ref, bookmark: Ref = ref(null)) { +export function usePreset(collection: Ref, bookmark: Ref = ref(null), temporary = false) { const presetsStore = usePresetsStore(); const userStore = useUserStore(); @@ -29,6 +29,7 @@ export function usePreset(collection: Ref, bookmark: Ref * @param preset The preset that should be saved */ const savePreset = async (preset?: Partial) => { + if (temporary) return; busy.value = true; const updatedValues = await presetsStore.savePreset(preset ? preset : localPreset.value); diff --git a/app/src/views/private/components/drawer-collection/drawer-collection.vue b/app/src/views/private/components/drawer-collection/drawer-collection.vue index 6abddb989e..a37f7bdb23 100644 --- a/app/src/views/private/components/drawer-collection/drawer-collection.vue +++ b/app/src/views/private/components/drawer-collection/drawer-collection.vue @@ -70,7 +70,7 @@ export default defineComponent({ const { collection } = toRefs(props); const { info: collectionInfo } = useCollection(collection); - const { layout, layoutOptions, layoutQuery, searchQuery } = usePreset(collection); + const { layout, layoutOptions, layoutQuery, searchQuery } = usePreset(collection, ref(null), true); // This is a local copy of the layout. This means that we can sync it the layout without // having use-preset auto-save the values