feat: Add support for setting icon & template at same time#14357
Conversation
|
Thanks for the PR! Would you also be interested in adding the corresponding JS api? Would require changes in https://github.com/ykogan-discord/tauri/blob/yonatron/set-icon-and-template-at-same-time/crates/tauri/src/tray/plugin.rs and https://github.com/ykogan-discord/tauri/blob/yonatron/set-icon-and-template-at-same-time/packages/api/src/tray.ts i think |
Package Changes Through 6255b92There are 11 changes which include tauri with minor, @tauri-apps/api with minor, tauri-build with minor, tauri-macos-sign with patch, tauri-bundler with minor, @tauri-apps/cli with minor, tauri-cli with minor, tauri-runtime with minor, tauri-runtime-wry with minor, tauri-utils with minor, tauri-plugin with minor Planned Package VersionsThe following package releases are the planned based on the context of changes in this pull request.
Add another change file through the GitHub UI by following this link. Read about change files or the docs at github.com/jbolda/covector |
Heyo! Yes happy to do this. Unsure of my exact timing but I'll try to get it done sooner than later. |
Okay, I made these changes just via pattern matching but I am unsure how to test them. I'm also getting a failure in a snapshot test, which is instructing me to run Apologies, a bit of a rust noob. |
|
yeah testing is a bit manual at the moment, at least for the js api, so we typically just use the example app. i usually just ignore the snapshot stuff tbh x) |
|
Okay turns out I needed to change one more file to expose the method in the plugin but I tested this and it's working! |
Calling set_icon and then set_icon_as_template in sequence cause a flicker as they both run on the main thread and update the UI. This exposes a single function to do both at once, preventing the flicker.
2874632 to
7a4044b
Compare
|
@FabianLars anything else you need from me here or do you do the merge? |
|
Ah no sorry, you're good! Just waiting for the merge window (which we didn't define yet) |
Friendly bump on this. I'm a colleague of Yonatan and would love to stop carrying this as a patch :) |
|
still waiting for that 2.10 merge window. i highly doubt it'll be before or during the holidays. |
|
@FabianLars it seems like 2.10 has come and gone :/ |
…template-at-same-time
…s#14357) * [macos] Add support for setting icon & template at same time Calling set_icon and then set_icon_as_template in sequence cause a flicker as they both run on the main thread and update the UI. This exposes a single function to do both at once, preventing the flicker. * Format * Update changed.md --------- Co-authored-by: Fabian-Lars <30730186+FabianLars@users.noreply.github.com>
…s#14357) * [macos] Add support for setting icon & template at same time Calling set_icon and then set_icon_as_template in sequence cause a flicker as they both run on the main thread and update the UI. This exposes a single function to do both at once, preventing the flicker. * Format * Update changed.md --------- Co-authored-by: Fabian-Lars <30730186+FabianLars@users.noreply.github.com>
Calling set_icon and then set_icon_as_template in sequence cause a flicker as they both run on the main thread and update the UI. This exposes a single function to do both at once, preventing the flicker.