mirror of
https://github.com/morgan9e/macos-stats
synced 2026-04-14 00:04:15 +09:00
feat: prevented closing popup view if unattached when open activity monitor or module settings
This commit is contained in:
@@ -389,13 +389,11 @@ internal class HeaderView: NSStackView {
|
||||
}
|
||||
|
||||
@objc func openActivityMonitor(_ sender: Any) {
|
||||
self.window?.setIsVisible(false)
|
||||
guard let app = self.app else { return }
|
||||
NSWorkspace.shared.open([], withApplicationAt: app, configuration: NSWorkspace.OpenConfiguration())
|
||||
}
|
||||
|
||||
@objc func openSettings(_ sender: Any) {
|
||||
self.window?.setIsVisible(false)
|
||||
NotificationCenter.default.post(name: .toggleSettings, object: nil, userInfo: ["module": self.title])
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user