mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-11 02:51:11 +00:00
Always bring app in foreground if alerted
This commit is contained in:
1 parent
62d285364f
commit
65515eb2ce
1 file changed
+9
@@ -267,6 +267,9 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
|
||||
}
|
||||
|
||||
func obtainUserConsent(for transfer: TransferMetadata, from device: RemoteDeviceInfo) {
|
||||
|
||||
NSApp.activate(ignoringOtherApps: true)
|
||||
|
||||
activeIncomingTransfers[transfer.id] = TransferInfo(device: device, transfer: transfer)
|
||||
|
||||
AudioManager.playSound()
|
||||
@@ -363,8 +366,11 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
|
||||
}
|
||||
|
||||
func showUnsupportedFileAlert(for device: RemoteDeviceInfo?) {
|
||||
|
||||
DispatchQueue.main.async {
|
||||
|
||||
NSApp.activate(ignoringOtherApps: true)
|
||||
|
||||
let alert = NSAlert()
|
||||
alert.alertStyle = .critical
|
||||
|
||||
@@ -383,6 +389,9 @@ class AppDelegate: NSObject, NSApplicationDelegate, UNUserNotificationCenterDele
|
||||
guard let transfer = activeIncomingTransfers[id] else { return }
|
||||
|
||||
if let error = error {
|
||||
|
||||
NSApp.activate(ignoringOtherApps: true)
|
||||
|
||||
var description = ""
|
||||
|
||||
if let ne = (error as? NearbyError) {
|
||||
|
||||
Reference in new issue
Block a user