Ariver
2026-06-27 369c8f03db2f6d507697ab2296db5e6f81c8cd1e
src/Apptag/ContentView.swift
@@ -19,6 +19,7 @@
    static let theme = "theme"
    static let tags = "tags"
    static let data = "data"
    static let about = "about"
}
// MARK: - Edit Phase
@@ -2953,6 +2954,15 @@
            closeQuickSearch(hideOverlayIfNeeded: true)
            hideOverlay()
        }
        if isCurrentApp(app) {
            if closeQuickSearchOnSuccess && !closeQuickSearchAndOverlayBeforeOpening {
                closeQuickSearch(hideOverlayIfNeeded: closeOverlayOnSuccess)
            }
            if closeOverlayOnSuccess && !closeQuickSearchAndOverlayBeforeOpening {
                hideOverlay()
            }
            return
        }
        let configuration = NSWorkspace.OpenConfiguration()
        NSWorkspace.shared.openApplication(at: app.path, configuration: configuration) { _, error in
            DispatchQueue.main.async {
@@ -2974,6 +2984,16 @@
        }
    }
    private func isCurrentApp(_ app: AppInfo) -> Bool {
        if app.bundleIdentifier?.caseInsensitiveCompare(AppIdentity.bundleIdentifier) == .orderedSame {
            return true
        }
        let currentURL = Bundle.main.bundleURL.standardizedFileURL.resolvingSymlinksInPath()
        let appURL = app.path.standardizedFileURL.resolvingSymlinksInPath()
        return currentURL == appURL
    }
    func openApp(_ app: AppInfo) {
        hideOverlay()
        launchApp(app, closeOverlayOnSuccess: false)