fix: menu regression from #15679 - #15735
Conversation
Legend-Master
left a comment
There was a problem hiding this comment.
I just knew for a fact calling something in drop would break something 😂
There was a problem hiding this comment.
I wonder if we should move the menu creation after app.register_core_plugins()?; like we did for initializing tray icons? (we should probably still keep the try_state to keep it safe though)
Lines 2383 to 2396 in e9e88a7
| pub(crate) fn remove_menu_channel<R: Runtime>(app: &AppHandle<R>, id: &MenuId) { | ||
| app.state::<MenuChannels>().0.lock().unwrap().remove(id); | ||
| // The state is only managed once this plugin is initialized, which happens after | ||
| // the `Builder::menu` closure runs, so menus dropped before that have no channel to remove. |
There was a problem hiding this comment.
| // the `Builder::menu` closure runs, so menus dropped before that have no channel to remove. | |
| // the `crate::Builder::menu` closure runs, so menus dropped before that have no channel to remove. |
eb46b16
Package Changes Through eb46b16There are 14 changes which include tauri with minor, tauri-cli with minor, @tauri-apps/cli with minor, tauri-bundler with minor, tauri-utils with minor, tauri-build with minor, tauri-macos-sign with minor, tauri-runtime-wry with minor, tauri-runtime with minor, tauri-codegen with minor, tauri-macros with minor, tauri-plugin with minor, tauri-driver with minor, @tauri-apps/api 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 |
This is probably not the right conversation to unpack this, but I think the state management should be strictly split between user and Tauri state. State initialization order is a bit non-obvious, and could be made more type safe. |
|
I do think there's room for improvement, but not sure how, do you have some ideas (no rush though)? |
No description provided.