mirror of
https://github.com/tauri-apps/tauri.git
synced 2024-11-28 20:48:52 +03:00
ece243d17c
Spawning an async task to remove the once listener caused it to be able to be called multiple times before being removed. This design choice was previously made due to deadlock happening when removing the event from inside `fn once`. That was because the listeners were already locked inside the trigger when asked to be removed. `fn trigger` now handles removing once handlers
375 B
375 B
tauri |
---|
patch |
Prevent "once" events from being able to be called multiple times.
Window::trigger(/*...*/)
is now properlypub
instead ofpub(crate)
.Manager::once_global(/*...*/)
now returns anEventHandler
.Window::once(/*...*/)
now returns anEventHandler
.- (internal)
event::Listeners::trigger(/*...*/)
now handles removing "once" events.