File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -363,10 +363,7 @@ async def invoke_on_restore_callbacks():
363363
364364 # Run the on_restored function after the flush cycle completes and
365365 # information is sent to the client.
366- # Update: Using `on_flush` to have the callbacks populate the output message
367- # queue going to the browser. If `on_flushed` is used, the messages stall
368- # until the next `on_flushed` invocation.
369- @session .on_flush
366+ @session .on_flushed
370367 async def invoke_on_restored_callbacks ():
371368 if self ._on_restored_callbacks .count () == 0 :
372369 return
Original file line number Diff line number Diff line change @@ -664,6 +664,11 @@ def verify_state(expected_state: ConnectionState) -> None:
664664 with session_context (self ):
665665 self .app .server (self .input , self .output , self )
666666
667+ # TODO: Remove this call to reactive_flush() once https://github.com/posit-dev/py-shiny/issues/1889 is fixed
668+ # Workaround: Any `on_flushed()` calls from bookmark's `on_restored()` will be flushed here
669+ if self .bookmark .store != "disable" :
670+ await reactive_flush ()
671+
667672 elif message_obj ["method" ] == "update" :
668673 verify_state (ConnectionState .Running )
669674
You can’t perform that action at this time.
0 commit comments