mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
fix: fixed bug on macOS 26 when settings autosaveName to menu bar item prevents it from loading (#2768)
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(MARKETING_VERSION)</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>726</string>
|
||||
<string>739</string>
|
||||
<key>Description</key>
|
||||
<string>Simple macOS system monitor in your menu bar</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
|
||||
@@ -70,7 +70,9 @@ internal class CombinedView: NSObject, NSGestureRecognizerDelegate {
|
||||
|
||||
public func enable() {
|
||||
self.menuBarItem = NSStatusBar.system.statusItem(withLength: 0)
|
||||
self.menuBarItem?.autosaveName = "CombinedModules"
|
||||
DispatchQueue.main.async(execute: {
|
||||
self.menuBarItem?.autosaveName = "CombinedModules"
|
||||
})
|
||||
self.menuBarItem?.button?.addSubview(self.view)
|
||||
self.menuBarItem?.button?.image = NSImage()
|
||||
self.menuBarItem?.button?.toolTip = localizedString("Combined modules")
|
||||
|
||||
@@ -257,7 +257,9 @@ extension AppDelegate {
|
||||
internal func icon() {
|
||||
if self.pauseState {
|
||||
self.menuBarItem = NSStatusBar.system.statusItem(withLength: AppIcon.size.width)
|
||||
self.menuBarItem?.autosaveName = "Stats"
|
||||
DispatchQueue.main.async(execute: {
|
||||
self.menuBarItem?.autosaveName = "Stats"
|
||||
})
|
||||
self.menuBarItem?.button?.addSubview(AppIcon())
|
||||
|
||||
self.menuBarItem?.button?.target = self
|
||||
|
||||
Reference in New Issue
Block a user