-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat: Add support for setting icon & template at same time #14357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
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 aa49486There are 1 changes which include tauri with patch 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) |
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.