mirror of
https://github.com/modrinth/code.git
synced 2026-07-31 13:16:38 +00:00
fix: remove unnesecary blocker
This commit is contained in:
@@ -1644,9 +1644,15 @@ async function sendMessage(status: ProjectStatus) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await refreshModerationCaches(threadId)
|
|
||||||
|
|
||||||
const willHaveNext = await moderationQueue.completeCurrentProject(projectId, 'completed')
|
const willHaveNext = await moderationQueue.completeCurrentProject(projectId, 'completed')
|
||||||
|
// Set both states together - hasNextProject MUST be set before done
|
||||||
|
// to avoid the race condition where done=true renders with hasNextProject=false
|
||||||
|
hasNextProject.value = willHaveNext
|
||||||
|
done.value = true
|
||||||
|
clearGeneratedMessageState()
|
||||||
|
await nextTick()
|
||||||
|
|
||||||
|
await refreshModerationCaches(threadId)
|
||||||
|
|
||||||
await Promise.race([
|
await Promise.race([
|
||||||
moderationQueue.releaseLock(projectId),
|
moderationQueue.releaseLock(projectId),
|
||||||
@@ -1656,16 +1662,9 @@ async function sendMessage(status: ProjectStatus) {
|
|||||||
if (projectFixChanges?.slug) {
|
if (projectFixChanges?.slug) {
|
||||||
const urlType = getProjectTypeForUrlShorthand(projectV2.value.project_type, [], tags.value)
|
const urlType = getProjectTypeForUrlShorthand(projectV2.value.project_type, [], tags.value)
|
||||||
localStorage.setItem('moderation-checklist-finished', projectId)
|
localStorage.setItem('moderation-checklist-finished', projectId)
|
||||||
clearGeneratedMessageState()
|
|
||||||
await navigateTo(`/${urlType}/${projectFixChanges.slug}/moderation`, { replace: true })
|
await navigateTo(`/${urlType}/${projectFixChanges.slug}/moderation`, { replace: true })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set both states together - hasNextProject MUST be set before done
|
|
||||||
// to avoid the race condition where done=true renders with hasNextProject=false
|
|
||||||
hasNextProject.value = willHaveNext
|
|
||||||
done.value = true
|
|
||||||
clearGeneratedMessageState()
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error submitting moderation:', error)
|
console.error('Error submitting moderation:', error)
|
||||||
addNotification({
|
addNotification({
|
||||||
|
|||||||
Reference in New Issue
Block a user