mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
Revert compactMap -> filterMap
This commit is contained in:
@ -575,11 +575,11 @@ class AppDelegate: NSObject,
|
||||
/// Toggles visibility of all Ghosty Terminal windows. When hidden, activates Ghostty as the frontmost application
|
||||
@IBAction func toggleVisibility(_ sender: Any) {
|
||||
// We only care about terminal windows.
|
||||
for window in NSApp.windows.filter({ $0.windowController is BaseTerminalController }) {
|
||||
for controller in NSApp.windows.compactMap({ $0.windowController as? BaseTerminalController }) {
|
||||
if isVisible {
|
||||
window.orderOut(nil)
|
||||
controller.window?.orderOut(nil)
|
||||
} else {
|
||||
window.makeKeyAndOrderFront(nil)
|
||||
controller.window?.makeKeyAndOrderFront(nil)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user