# settings ui: Update file headers when adding or removing projects \(\#40968\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/1edb1b389613abbd2b62b07aff0be7350e078829)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 1edb1b389613abbd2b62b07aff0be7350e078829

Requested commit: 1edb1b389613abbd2b62b07aff0be7350e078829

Commit: 1edb1b389613abbd2b62b07aff0be7350e078829

Tree: 6faf999eed06cde66dad946726f195f845e9ff63

Author: Anthony Eid

Committer: GitHub

## Message

```
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
```

## Parents

- [8f4646d6c357409cfc286104088b4d21f2bea851](https://git.cafe/gitcafe/zed/commit/8f4646d6c357409cfc286104088b4d21f2bea851?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/1edb1b389613abbd2b62b07aff0be7350e078829?format=markdown)
