Fixes "Menu Bar Items Not Updating (#1684)"
Description
The issue is described in detail in #1684.
~I tried to resolve a related issue, #1696, but it was harder than I anticipated since the state of the Utility Area is stored separate to the other panes for some reason. Any ideas to resolve this slight issue would be welcome :)~
EDIT: I think I fixed it!
Related Issues
- Closes #1684
- Closes #1696
Checklist
- [x] I read and understood the contributing guide as well as the code of conduct
- [x] The issues this PR addresses are related to each other
- [x] My changes generate no new warnings
- [x] My code builds and runs on my machine
- [x] My changes are all related to the related issue above
- [x] I documented my code
Screenshots
https://github.com/CodeEditApp/CodeEdit/assets/65467530/166d9b35-ede1-47b8-8814-cf1cbb1a61f2
I fix lint errors and I can review 👍
By the way, the SwiftLint error feels a bit overly constraining, especially considering it limits the class body to 250 lines and my code currently has 251; is there a way to perhaps silence the warning, or is that not recommended?
Yeah I don't understand why it gives an error now on that file. The length of the class is way longer than 251 lines...
@thecoolwinter bump?
Yeah swiftlint errors can be annoying, especially when it's one line over the limit. But in this case we can just move some code to an extension. I believe all the toolbar code can be moved to a new file without modification (lines 141-238ish). Just a new file in the same dir named CodeEditWindowController+Toolbar.swift.
@thecoolwinter does this look good?
Looks good, thanks for your patience!
@allcontributors add @danielzsh for bug