refactor(global-shortcut): enhance un/register to accept an array, remove un/registerAll (#1117)

* refactor(shell): enhance `un/register` to accept an array, remove `un/registerAll`

closes #1101

* Update lib.rs

* remove permissions, cleanup docs

* bring back unregister_all

* fmt

* fix build

* bundle

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.app>
This commit is contained in:
Amr Bashir
2024-07-08 19:20:00 +03:00
committed by GitHub
parent a66549329c
commit 381a466db3
9 changed files with 101 additions and 123 deletions
@@ -0,0 +1,10 @@
---
"global-shortcut": "patch"
---
Refactored the Rust APIs:
- Renamed `GlobalShortcut::on_all_shortcuts` to `GlobalShortcut::on_shortcuts`
- Renamed `GlobalShortcut::register_all` to `GlobalShortcut::register_multiple`
- Changed `GlobalShortcut::unregister_all` behavior to remove all registerd shortcuts.
- Added `GlobalShortcut::unregister_multiple` to register a list of shortcuts (old behavior of `unregister_all`).
@@ -0,0 +1,8 @@
---
"global-shortcut-js": "patch"
---
Refactored the JS APIs:
- Enhanced `register` and `unregister` to take either a single shortcut or an array.
- Removed `registerAll` instead use `register` with an array.