Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LauncherApplication/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class AppDelegate: NSObject, NSApplicationDelegate {
}

func applicationWillTerminate(_ aNotification: Notification) {
// Insert code here to tear down your application
DistributedNotificationCenter.default().removeObserver(self)
}


Expand Down
4 changes: 4 additions & 0 deletions hidden/Features/Preferences/PreferencesViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ class PreferencesViewController: NSViewController {
}
}

deinit {
NotificationCenter.default.removeObserver(self)
}

//MARK: - VC Life cycle
override func viewDidLoad() {
super.viewDidLoad()
Expand Down
10 changes: 5 additions & 5 deletions hidden/Features/StatusBar/StatusBarController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ class StatusBarController {
setupUI()
setupAlwayHideStatusBar()
NotificationCenter.default.addObserver(self, selector: #selector(handleScreenParametersChanged), name: NSApplication.didChangeScreenParametersNotification, object: nil)
DispatchQueue.main.asyncAfter(deadline: .now() + 1, execute: {
self.collapseMenuBar()
})
DispatchQueue.main.asyncAfter(deadline: .now() + 1) { [weak self] in
self?.collapseMenuBar()
}

if Preferences.areSeparatorsHidden {hideSeparators()}
autoCollapseIfNeeded()
Expand Down Expand Up @@ -157,8 +157,8 @@ class StatusBarController {
if isToggle {return}
isToggle = true
self.isCollapsed ? self.expandMenubar() : self.collapseMenuBar()
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) {
self.isToggle = false
DispatchQueue.main.asyncAfter(deadline: .now() + 0.3) { [weak self] in
self?.isToggle = false
}
}

Expand Down
1 change: 0 additions & 1 deletion hidden/Models/GlobalKeybindingPreferences.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ struct GlobalKeybindPreferences: Codable, CustomStringConvertible {
let keyCode : UInt32

var description: String {
print(keyCode)
var stringBuilder = ""
if self.function {
stringBuilder += "Fn"
Expand Down