Skip to content

Commit

Permalink
Merge pull request #735 from quoid/revert-731-feat/do-not-open-safari…
Browse files Browse the repository at this point in the history
…-when-change-save-location

Revert "feat(macos): do not open safari when change save location"
  • Loading branch information
ACTCD authored Sep 30, 2024
2 parents 9248fa4 + 8fad473 commit 6d1b9a7
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions xcode/App-Mac/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
]
)
})
}

Expand Down

0 comments on commit 6d1b9a7

Please sign in to comment.