Commit graph

3 commits

Author SHA1 Message Date
Jack Ye
95fc3eb489
Improve code quality
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-03-10 12:20:45 +08:00
Jack251970
fc147c3377 Await async delegates fully in DispatcherHelper
Ensure that async functions invoked via dispatcher are awaited until completion, not just until scheduled, by using double await on InvokeAsync. This prevents premature continuation when the delegate itself is asynchronous.
2026-03-10 12:00:28 +08:00
Jack251970
036713c669 Refactor UI thread invocation with DispatcherHelper
Introduce DispatcherHelper for safe UI thread access and replace direct Dispatcher.Invoke calls across the codebase. This centralizes thread invocation logic, reduces boilerplate, and improves maintainability. Some methods are refactored for clarity and UI thread safety.
2026-03-10 11:48:55 +08:00