From 8fad47314cc5f2c4705c1b68aafbc3237ade2b0e Mon Sep 17 00:00:00 2001 From: ACTCD <101378590+ACTCD@users.noreply.github.com> Date: Mon, 30 Sep 2024 01:45:31 +0800 Subject: [PATCH] Revert "feat(macos): do not open safari when change save location" --- xcode/App-Mac/ViewController.swift | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/xcode/App-Mac/ViewController.swift b/xcode/App-Mac/ViewController.swift index bf6a4267..fc7598ee 100644 --- a/xcode/App-Mac/ViewController.swift +++ b/xcode/App-Mac/ViewController.swift @@ -65,16 +65,14 @@ class ViewController: NSViewController { // update user interface text display self.saveLocation.stringValue = url.absoluteString self.saveLocation.toolTip = url.absoluteString - // notify browser extension of relevant updates only when Safari is running - if !NSRunningApplication.runningApplications(withBundleIdentifier: "com.apple.Safari").isEmpty { - sendExtensionMessage( - name: "SAVE_LOCATION_CHANGED", - userInfo: [ - "saveLocation": url.absoluteString.removingPercentEncoding ?? url.absoluteString, - "returnApp": true - ] - ) - } + // notify browser extension of relevant updates + sendExtensionMessage( + name: "SAVE_LOCATION_CHANGED", + userInfo: [ + "saveLocation": url.absoluteString.removingPercentEncoding ?? url.absoluteString, + "returnApp": true + ] + ) }) }