Skip to content

Commit

Permalink
Fix renderDelay not being applied to dynamicBlocks (#3637)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdcolin committed May 18, 2023
1 parent de6c583 commit 6b49959
Showing 1 changed file with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,21 @@ const blockState = types
},
afterAttach() {
const display = getContainingDisplay(self)
makeAbortableReaction(
self as any,
renderBlockData,
renderBlockEffect, // reaction doesn't expect async here
{
name: `${display.id}/${assembleLocString(self.region)} rendering`,
delay: display.renderDelay,
fireImmediately: true,
},
this.setLoading,
this.setRendered,
this.setError,
)
setTimeout(() => {
makeAbortableReaction(
self as any,
renderBlockData,
renderBlockEffect, // reaction doesn't expect async here
{
name: `${display.id}/${assembleLocString(self.region)} rendering`,
delay: display.renderDelay,
fireImmediately: true,
},
this.setLoading,
this.setRendered,
this.setError,
)
}, display.renderDelay)
},
setStatus(message: string) {
self.status = message
Expand Down

0 comments on commit 6b49959

Please sign in to comment.