Skip to content

Commit

Permalink
Update NewReply.vue (#3718)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewwallacespeckle authored Dec 18, 2024
1 parent a6d7aad commit 53237b4
Showing 1 changed file with 18 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,26 @@ const onSubmit = async () => {
if (!isValidCommentContentInput(content)) return

loading.value = true
await createReply({
content,
threadId: threadId.value,
projectId: projectId.value
})
updateIsTyping(false)
try {
await createReply({
content,
threadId: threadId.value,
projectId: projectId.value
})
updateIsTyping(false)

// Mark all attachments as in use to prevent cleanup
commentValue.value.attachments?.forEach((a) => {
a.inUse = true
})
// Mark all attachments as in use to prevent cleanup
commentValue.value.attachments?.forEach((a) => {
a.inUse = true
})

commentValue.value = {
doc: undefined,
attachments: undefined
commentValue.value = {
doc: undefined,
attachments: undefined
}
emit('submit')
} finally {
loading.value = false
}
loading.value = false
emit('submit')
}
</script>

0 comments on commit 53237b4

Please sign in to comment.