From c09043938a9a61b580d1c6e59a3dfebb00e3081d Mon Sep 17 00:00:00 2001 From: N-Pex Date: Wed, 16 Jul 2025 15:47:39 +0200 Subject: [PATCH] Use shallowReactive() for attachment objects For issue #664 --- src/models/attachmentManager.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/models/attachmentManager.ts b/src/models/attachmentManager.ts index c726756..366c6e6 100644 --- a/src/models/attachmentManager.ts +++ b/src/models/attachmentManager.ts @@ -17,7 +17,7 @@ import { import proofmode from "../plugins/proofmode"; import imageSize from "image-size"; import imageResize from "image-resize"; -import { computed, Reactive, reactive, ref, Ref } from "vue"; +import { computed, Reactive, reactive, ref, Ref, shallowReactive } from "vue"; import utils, { THUMBNAIL_MAX_WIDTH, THUMBNAIL_MAX_HEIGHT } from "@/plugins/utils"; export class AttachmentManager { @@ -55,7 +55,7 @@ export class AttachmentManager { file: file, useScaled: false, }; - const ra = reactive(a); + const ra = shallowReactive(a); this.prepareUpload(ra); return ra; } @@ -199,7 +199,7 @@ export class AttachmentManager { const fileSize = this.getSrcFileSize(event); - const attachment: Reactive = reactive({ + const attachment: Reactive = shallowReactive({ event: event, name: this.getFileName(event), srcSize: fileSize, @@ -507,7 +507,7 @@ export const createUploadBatch = ( randomTranslationY: 0, promise: undefined, }; - attachment.sendInfo = reactive(sendInfo); + attachment.sendInfo = shallowReactive(sendInfo); }); const sendingPromise = utils