From 76db7ba7816fdcdba03314c062c9319f02118784 Mon Sep 17 00:00:00 2001 From: nullobsi Date: Fri, 21 Jan 2022 00:43:51 -0800 Subject: [PATCH] update local copy of file when describing (#8131) --- packages/client/src/components/post-form-attaches.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/client/src/components/post-form-attaches.vue b/packages/client/src/components/post-form-attaches.vue index 0782ce22e..4555fc1a2 100644 --- a/packages/client/src/components/post-form-attaches.vue +++ b/packages/client/src/components/post-form-attaches.vue @@ -99,10 +99,12 @@ export default defineComponent({ }, { done: result => { if (!result || result.canceled) return; - let comment = result.result; + let comment = result.result.length == 0 ? null : result.result; os.api('drive/files/update', { fileId: file.id, - comment: comment.length == 0 ? null : comment + comment: comment, + }).then(() => { + file.comment = comment; }); } }, 'closed');