Skip to content

Commit

Permalink
Add a tiny delay inbetween synced queue actions to allow actions like…
Browse files Browse the repository at this point in the history
… source visibility to finish
  • Loading branch information
LordTocs committed Dec 2, 2023
1 parent fb7ea1b commit 74b07d6
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/castmate/src/main/actions/action-queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,9 @@ export class ActionQueue {
frontAutomation.context
)
this.syncAutomationPromise = frontPromise
this.syncAutomationPromise.then(() => this._runNext())
this.syncAutomationPromise.then(() =>
setTimeout(() => this._runNext(), 30)
)
release()
} else {
this.syncAutomationPromise = null
Expand All @@ -329,7 +331,9 @@ export class ActionQueue {
frontAutomation.context
)
this.syncAutomationPromise = frontPromise
this.syncAutomationPromise.then(() => this._runNext())
this.syncAutomationPromise.then(() =>
setTimeout(() => this._runNext(), 30)
)
release()
}
}

0 comments on commit 74b07d6

Please sign in to comment.