update Undo Redo Buttons
Updates the enabled state of undo/redo buttons asynchronously. Calls UndoProvider.canUndo and UndoProvider.canRedo on a background thread with a 500ms timeout fallback to prevent ANRs.
Buttons are disabled while any undo/redo operation is executing to prevent concurrent operations that could corrupt the undo stack.
Parameters
on State Updated
Optional callback invoked on main thread when undo/redo state is determined. Receives (canUndo, canRedo) boolean values. Called even during timeout fallback with (false, false) values.