-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: enhance event system rust apis (#7996)
Co-authored-by: Lucas Nogueira <[email protected]>
- Loading branch information
1 parent
198abe3
commit 93c8a77
Showing
9 changed files
with
521 additions
and
347 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
'tauri': 'major:breaking' | ||
--- | ||
|
||
The event system APIS on Rust is recieving a few changes for consistency and quality of life improvements: | ||
|
||
- Renamed `Manager::emit_all` to just `Manager::emit` and will now both trigger the events on JS side as well as Rust. | ||
- Removed `Manager::trigger_global`, use `Manager::emit` | ||
- Added `Manager::emit_filter`. | ||
- Removed `Window::emit`, and moved the implementation to `Manager::emit`. | ||
- Removed `Window::emit_and_trigger` and `Window::trigger`, use `Window::emit` instead. | ||
- Changed `Window::emit_to` to only trigger the target window listeners so it won't be catched by `Manager::listen_global` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.