settings ui: Update file headers when adding or removing projects (#40968)
This PR gets the `SettingsWindow` struct to subscribe to all `Entity<Project>` events and any future project entities that are created. When a project emits an event that signals a worktree has been added or removed, the settings window refetches all settings files it can find. This fixes a bug where the settings ui would notice some project settings that were created or opened after the `SettingsWindow` has been initialized. I also renamed `LOCAL` file mask to `PROJECT` to be inline with the `SettingsFile` naming convention. Release Notes: - settings ui: Fix bug where project setting files wouldn't be detected if they were created or opened after while an active settings window is open
This commit is contained in:
@@ -1458,7 +1458,7 @@ impl Workspace {
|
||||
}),
|
||||
cx.on_release(move |this, cx| {
|
||||
this.app_state.workspace_store.update(cx, move |store, _| {
|
||||
store.workspaces.remove(&window_handle.clone());
|
||||
store.workspaces.remove(&window_handle);
|
||||
})
|
||||
}),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user