Browse Source

MOS-20 Force to main queue the uninstallMenuExtra function. Modified manually, not cherry-pick.

APPLEMAIL-42
David Alarcon 1 year ago
parent
commit
3bf5db4bdb
1 changed files with 9 additions and 14 deletions
  1. +9
    -14
      Submodules/pEpNotifications/PEPUpdatesApp/AppDelegate.swift

+ 9
- 14
Submodules/pEpNotifications/PEPUpdatesApp/AppDelegate.swift View File

@ -170,8 +170,11 @@ extension AppDelegate {
return
}
NSStatusBar.system.removeStatusItem(barItem)
statusBarItem = nil
DispatchQueue.main.async { [weak self] in
guard let me = self else { return }
NSStatusBar.system.removeStatusItem(barItem)
me.statusBarItem = nil
}
}
}
@ -270,15 +273,12 @@ extension AppDelegate: NSUserNotificationCenterDelegate {
return
}
DispatchQueue.main.async { [weak self] in
guard let me = self else { return }
me.uninstallMenuExtra()
}
let filename : String = didActivate.userInfo?["filename"] as! String
NSLog("pEpUpdates: actionButtonClicked for %@", filename)
NSWorkspace.shared.openFile(filename)
downloadStateNotifier.notify(.Connected)
uninstallMenuExtra()
}
}
@ -286,15 +286,10 @@ extension AppDelegate: NSUserNotificationCenterDelegate {
extension AppDelegate: DownloadNotificationManagerDelegate {
func installSelected(with product: Product) {
defer {
DispatchQueue.main.async { [weak self] in
guard let me = self else { return }
me.uninstallMenuExtra()
}
}
NSLog("pEpUpdates: actionButtonClicked for %@", product.filename)
NSWorkspace.shared.openFile(product.filename)
downloadStateNotifier.notify(.Connected)
uninstallMenuExtra()
}
}

Loading…
Cancel
Save