harden lazy reveal

This commit is contained in:
Will McGugan
2024-11-15 14:28:46 +00:00
parent 86fc98a008
commit f74e4db5e0

View File

@@ -115,9 +115,15 @@ class Reveal(Widget):
if not widgets:
return
widget = widgets.pop(0)
await parent.mount(widget)
try:
await parent.mount(widget)
except Exception:
# I think this can occur if the parent is removed before all children are added
# Only noticed this on shutdown
return
if widgets:
parent.call_next(check_children)
parent.set_timer(0.02, check_children)
parent.call_next(check_children)