diff --git a/plugins/attachment-resources/src/components/AttachmentRefInput.svelte b/plugins/attachment-resources/src/components/AttachmentRefInput.svelte index a9fc603dd4..e67f18ca96 100644 --- a/plugins/attachment-resources/src/components/AttachmentRefInput.svelte +++ b/plugins/attachment-resources/src/components/AttachmentRefInput.svelte @@ -210,8 +210,12 @@ async function onMessage (event: CustomEvent) { loading = true - await createAttachments() - dispatch('message', { message: event.detail, attachments: attachments.size }) + try { + await createAttachments() + dispatch('message', { message: event.detail, attachments: attachments.size }) + } finally { + loading = false + } } async function onUpdate (event: CustomEvent) { diff --git a/plugins/chunter-resources/src/components/ChannelView.svelte b/plugins/chunter-resources/src/components/ChannelView.svelte index 5d5566e335..57d472604e 100644 --- a/plugins/chunter-resources/src/components/ChannelView.svelte +++ b/plugins/chunter-resources/src/components/ChannelView.svelte @@ -75,6 +75,7 @@ _id = generateId() isScrollForced = true + loading = false } function openThread (_id: Ref) { @@ -106,6 +107,7 @@ savedAttachmentsQuery.query(attachment.class.SavedAttachments, {}, (res) => { savedAttachmentsIds = res.map((r) => r.attachedTo) }) + let loading = false @@ -120,7 +122,7 @@ {savedAttachmentsIds} />
- +