From 69e20c361756bb8039fdb8b1e8a6ccd074b7d2b8 Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Tue, 02 Jun 2026 23:12:26 +0800
Subject: [PATCH] Add 7.8.10 App Store candidate DMG

---
 Apptag/ContentView.swift |  326 ++++++++++++++++++++++++++++-------------------------
 1 files changed, 172 insertions(+), 154 deletions(-)

diff --git a/Apptag/ContentView.swift b/Apptag/ContentView.swift
index da98d57..f29d986 100644
--- a/Apptag/ContentView.swift
+++ b/Apptag/ContentView.swift
@@ -313,10 +313,12 @@
     var editingBubble: AppBubbleContext? = nil
     var pendingUncategorizedDrop: PendingUncategorizedDrop? = nil
     var pendingTagRemovalDrop: PendingTagRemovalDrop? = nil
+    var uncategorizedDropSuppressFuturePrompt = false
     var tagRemovalDropSuppressFuturePrompt = false
     var appDragResetToken = 0
     var bubbleDraftNote = ""
     var tagNavigationHoveredGroupName: String? = nil
+    var tagNavigationAppDropTargetName: String? = nil
     var tagNavigationLastHoverScrollID: String? = nil
     var tagNavigationLastHoverScrollAt: Date? = nil
 }
@@ -338,20 +340,6 @@
     let id = UUID()
     let app: AppInfo
     let tagName: String
-}
-
-private enum SmartStartNoticeMode {
-    case autoApplied
-    case suggestionOnly
-    case manuallyApplied
-}
-
-private struct SmartStartNotice: Identifiable {
-    let id = UUID()
-    let mode: SmartStartNoticeMode
-    let title: String
-    let message: String
-    let summary: SmartStartSummary
 }
 
 struct ContentView: View {
@@ -400,6 +388,7 @@
     @State private var quickSearchFocusToken = 0
     @State private var quickSearchSelectionScrollToken = 0
     @State private var quickSearchCloseHidesOverlay = false
+    @State private var quickSearchOnlySession = false
     @State private var quickSearchErrorMessage: String? = nil
     @State private var initialQuickSearchConsumed = false
 
@@ -407,8 +396,10 @@
         self.hideOverlay = hideOverlay
         self.initialQuickSearchSource = initialQuickSearchSource
         let startsInQuickSearch = initialQuickSearchSource != nil
+        let startsInQuickSearchOnlySession = initialQuickSearchSource == QuickSearchOpenSource.globalHidden
         _quickSearchVisible = State(initialValue: startsInQuickSearch)
-        _quickSearchCloseHidesOverlay = State(initialValue: initialQuickSearchSource == QuickSearchOpenSource.globalHidden)
+        _quickSearchCloseHidesOverlay = State(initialValue: startsInQuickSearchOnlySession)
+        _quickSearchOnlySession = State(initialValue: startsInQuickSearchOnlySession)
         _quickSearchFocusToken = State(initialValue: startsInQuickSearch ? 1 : 0)
     }
 
@@ -423,6 +414,7 @@
     @AppStorage("showUncommonAppBubbles") private var showUncommonAppBubbles = AppDefaults.showUncommonAppBubbles
     @AppStorage("useAppKitTagNavigation") private var useAppKitTagNavigation = AppDefaults.useAppKitTagNavigation
     @AppStorage("skipTagRemovalDropConfirm") private var skipTagRemovalDropConfirm = false
+    @AppStorage("skipUncategorizedDropConfirm") private var skipUncategorizedDropConfirm = false
 
     private let editSidebarWidth: CGFloat = 188
     private let editSidebarHorizontalInset: CGFloat = 12
@@ -459,7 +451,10 @@
     }
 
     private var shouldRenderAppGridBehindQuickSearch: Bool {
-        !quickSearchVisible || !quickSearchCloseHidesOverlay
+        if quickSearchOnlySession {
+            return false
+        }
+        return !quickSearchVisible || !quickSearchCloseHidesOverlay
     }
 
     var body: some View {
@@ -539,7 +534,10 @@
             refreshAppsIfNeeded()
             if let initialQuickSearchSource, !initialQuickSearchConsumed {
                 initialQuickSearchConsumed = true
-                quickSearchCloseHidesOverlay = initialQuickSearchSource == QuickSearchOpenSource.globalHidden
+                if initialQuickSearchSource == QuickSearchOpenSource.globalHidden {
+                    quickSearchCloseHidesOverlay = true
+                    quickSearchOnlySession = true
+                }
                 if !quickSearchVisible {
                     quickSearchVisible = true
                     quickSearchFocusToken &+= 1
@@ -548,7 +546,10 @@
                 NotificationCenter.default.post(
                     name: .tagLauncherQuickSearchVisibilityChanged,
                     object: nil,
-                    userInfo: ["active": true]
+                    userInfo: [
+                        "active": true,
+                        "hideOverlayOnClose": quickSearchCloseHidesOverlay
+                    ]
                 )
             }
         }
@@ -560,6 +561,8 @@
         .onReceive(NotificationCenter.default.publisher(for: .tagLauncherOverlayDidHide)) { _ in
             resetTransientDragState()
             closeQuickSearch(notify: true, hideOverlayIfNeeded: false)
+            quickSearchOnlySession = false
+            quickSearchCloseHidesOverlay = false
         }
         .onReceive(NotificationCenter.default.publisher(for: .tagLauncherQuickSearchRequested)) { notification in
             let source = notification.userInfo?["source"] as? String ?? QuickSearchOpenSource.mainOverlay
@@ -664,7 +667,7 @@
                     }
                     .zIndex(899)
 
-                QuickSearchOverlayView(
+                QuickSearchPanelPresentationView(
                     query: $quickSearchQuery,
                     results: quickSearchResults,
                     selectedID: quickSearchSelectedID,
@@ -672,16 +675,15 @@
                     selectionScrollToken: quickSearchSelectionScrollToken,
                     isLoading: quickSearchDocuments.isEmpty && refreshInProgress,
                     maxVisibleRows: quickSearchMaxVisibleRows(in: proxy.size),
+                    panelTopY: quickSearchPanelTopY(in: proxy.size),
+                    panelHeight: quickSearchPanelContentHeight(in: proxy.size),
                     errorMessage: quickSearchErrorMessage,
                     onCommand: handleQuickSearchCommand,
                     onHover: selectQuickSearchResult,
                     onLaunch: launchQuickSearchResult
                 )
-                .position(
-                    x: proxy.size.width / 2,
-                    y: quickSearchPanelCenterY(in: proxy.size)
-                )
-                .transition(.scale(scale: 0.98).combined(with: .opacity))
+                .frame(width: 0, height: 0)
+                .allowsHitTesting(false)
                 .zIndex(900)
             }
         }
@@ -689,10 +691,15 @@
         .animation(.easeOut(duration: 0.12), value: quickSearchVisible)
     }
 
-    private func quickSearchPanelCenterY(in size: CGSize) -> CGFloat {
-        let visibleRows = max(1, min(quickSearchResults.isEmpty ? 1 : quickSearchResults.count, quickSearchMaxVisibleRows(in: size)))
-        let estimatedPanelHeight = CGFloat(visibleRows) * 76 + 122
-        return quickSearchPanelTopY(in: size) + estimatedPanelHeight / 2
+    private func quickSearchPanelContentHeight(in size: CGSize) -> CGFloat {
+        let hasResultList = !(quickSearchDocuments.isEmpty && refreshInProgress)
+            && quickSearchErrorMessage == nil
+            && !quickSearchResults.isEmpty
+        let visibleRows = min(max(1, quickSearchResults.count), quickSearchMaxVisibleRows(in: size))
+        return QuickSearchPanelMetrics.contentHeight(
+            hasResultList: hasResultList,
+            visibleRows: visibleRows
+        )
     }
 
     private func quickSearchPanelTopY(in size: CGSize) -> CGFloat {
@@ -701,8 +708,11 @@
 
     private func quickSearchMaxVisibleRows(in size: CGSize) -> Int {
         let bottomClearance: CGFloat = 84
-        let chromeHeight: CGFloat = 122
-        let rowHeightWithSpacing: CGFloat = 76
+        let chromeHeight = QuickSearchPanelMetrics.headerHeight
+            + QuickSearchPanelMetrics.dividerHeight
+            + QuickSearchPanelMetrics.resultListVerticalInset * 2
+        let rowHeightWithSpacing = QuickSearchPanelMetrics.rowHeight
+            + QuickSearchPanelMetrics.rowSpacing
         let availableHeight = max(0, size.height - quickSearchPanelTopY(in: size) - bottomClearance - chromeHeight)
         return max(1, min(8, Int(floor(availableHeight / rowHeightWithSpacing))))
     }
@@ -710,7 +720,11 @@
     private func openQuickSearch(source: String) {
         guard canOpenQuickSearch else { return }
         dismissAppBubble()
-        quickSearchCloseHidesOverlay = source == QuickSearchOpenSource.globalHidden
+        if source == QuickSearchOpenSource.globalHidden {
+            quickSearchOnlySession = true
+        }
+        quickSearchCloseHidesOverlay = quickSearchCloseHidesOverlay
+            || source == QuickSearchOpenSource.globalHidden
         quickSearchVisible = true
         quickSearchQuery = ""
         quickSearchManualSelection = false
@@ -720,7 +734,10 @@
         NotificationCenter.default.post(
             name: .tagLauncherQuickSearchVisibilityChanged,
             object: nil,
-            userInfo: ["active": true]
+            userInfo: [
+                "active": true,
+                "hideOverlayOnClose": quickSearchCloseHidesOverlay
+            ]
         )
     }
 
@@ -741,16 +758,20 @@
         quickSearchSelectedID = nil
         quickSearchManualSelection = false
         quickSearchErrorMessage = nil
-        quickSearchCloseHidesOverlay = false
         if notify {
             NotificationCenter.default.post(
                 name: .tagLauncherQuickSearchVisibilityChanged,
                 object: nil,
-                userInfo: ["active": false]
+                userInfo: [
+                    "active": false,
+                    "hideOverlayOnClose": shouldHideOverlay
+                ]
             )
         }
         if shouldHideOverlay {
             hideOverlay()
+        } else {
+            quickSearchCloseHidesOverlay = false
         }
     }
 
@@ -928,6 +949,7 @@
 
     private func appKitTagNavigation(orientation: TagNavigationView.Orientation) -> some View {
         let isHorizontal = orientation == .horizontal
+        let appDropTargetID = appGridInteraction.tagNavigationAppDropTargetName
         return TagNavigationView(
             items: tagLabels,
             orientation: orientation,
@@ -936,6 +958,8 @@
                 : NSEdgeInsets(top: 12, left: 12, bottom: 12, right: 12),
             dragModeActive: tagNavDragModeActive,
             draggingItemID: tagNavDragItem,
+            appDragModeActive: appGridInteraction.appDragModeActive,
+            appDropTargetID: appDropTargetID,
             onActivate: { tagID in
                 activateTagNavigation(tagID)
             },
@@ -945,6 +969,9 @@
             canReorder: { tagID in
                 canReorderTag(tagID)
             },
+            canAcceptAppDrop: { tagID in
+                canAssignDroppedAppToTag(tagID)
+            },
             onReorderBegan: { tagID in
                 beginTagNavReorder(tagID)
             },
@@ -953,6 +980,12 @@
             },
             onReorderEnded: {
                 endTagNavReorder()
+            },
+            onAppDropHoverChange: { tagID, active in
+                handleTagNavigationAppDropHover(tagID, active: active)
+            },
+            onAppDrop: { path, source, targetTag, copy in
+                dropAppOnTagNavigation(path: path, sourceTag: source, targetTag: targetTag, copy: copy)
             }
         )
     }
@@ -1093,88 +1126,12 @@
     }
 
     private var smartStartNoticeOverlay: some View {
-        GeometryReader { proxy in
-            if let notice = smartStartNotice {
-                let panelWidth = min(560, max(320, proxy.size.width - 64))
-
-                ZStack {
-                    Color.black.opacity(0.10)
-                        .ignoresSafeArea()
-
-                    VStack(spacing: 18) {
-                        Image(systemName: notice.mode == .suggestionOnly ? "sparkles" : "checkmark.seal.fill")
-                            .font(.system(size: 30, weight: .semibold))
-                            .foregroundStyle(Color.accentColor)
-                            .frame(width: 58, height: 58)
-                            .background(
-                                Circle()
-                                    .fill(Color.accentColor.opacity(0.12))
-                            )
-
-                        VStack(spacing: 8) {
-                            Text(notice.title)
-                                .font(.system(size: 21, weight: .semibold))
-                                .foregroundStyle(.primary)
-                                .multilineTextAlignment(.center)
-
-                            Text(notice.message)
-                                .font(.system(size: 15, weight: .regular))
-                                .foregroundStyle(.secondary)
-                                .multilineTextAlignment(.center)
-                                .lineLimit(4)
-                                .fixedSize(horizontal: false, vertical: true)
-                        }
-
-                        HStack(spacing: 12) {
-                            switch notice.mode {
-                            case .suggestionOnly:
-                                Button(tr("smartstart.later")) {
-                                    dismissSmartStartNotice()
-                                }
-                                .buttonStyle(.bordered)
-                                .controlSize(.large)
-
-                                Button(tr("smartstart.apply")) {
-                                    applySmartStartSuggestion()
-                                }
-                                .buttonStyle(.borderedProminent)
-                                .controlSize(.large)
-                            case .autoApplied, .manuallyApplied:
-                                if notice.summary.backupPath != nil {
-                                    Button(tr("smartstart.undo")) {
-                                        undoSmartStart()
-                                    }
-                                    .buttonStyle(.bordered)
-                                    .controlSize(.large)
-                                }
-                                Button(tr("smartstart.ok")) {
-                                    dismissSmartStartNotice()
-                                }
-                                .buttonStyle(.borderedProminent)
-                                .controlSize(.large)
-                            }
-                        }
-                    }
-                    .padding(.horizontal, 30)
-                    .padding(.vertical, 26)
-                    .frame(width: panelWidth)
-                    .background(
-                        RoundedRectangle(cornerRadius: 16)
-                            .fill(.ultraThickMaterial)
-                            .shadow(color: .black.opacity(0.26), radius: 28, y: 16)
-                    )
-                    .overlay(
-                        RoundedRectangle(cornerRadius: 16)
-                            .stroke(.white.opacity(0.16), lineWidth: 1)
-                    )
-                }
-                .frame(width: proxy.size.width, height: proxy.size.height)
-                .transition(.scale(scale: 0.96).combined(with: .opacity))
-                .zIndex(650)
-            }
-        }
-        .ignoresSafeArea()
-        .allowsHitTesting(smartStartNotice != nil)
+        SmartStartNoticeOverlay(
+            notice: smartStartNotice,
+            onDismiss: dismissSmartStartNotice,
+            onApply: applySmartStartSuggestion,
+            onUndo: undoSmartStart
+        )
     }
     // MARK: - Edit Tags View
 
@@ -1503,6 +1460,8 @@
                     UncategorizedDropConfirmBubble(
                         title: tr("drop.uncategorizedConfirmTitle"),
                         message: uncategorizedConfirmMessage(for: pendingDrop),
+                        doNotRemindTitle: tr("drop.removeTagDoNotAskAgain"),
+                        doNotRemind: $appGridInteraction.uncategorizedDropSuppressFuturePrompt,
                         cancelTitle: tr("tag.cancel"),
                         confirmTitle: tr("edit.confirm"),
                         onCancel: dismissUncategorizedDropConfirm,
@@ -1695,23 +1654,14 @@
 
         let scannedApps = allApps
         DispatchQueue.global(qos: .userInitiated).async {
-            let result = SmartStartService.applySuggestion(draft)
-            let store = result.store
-            let apps = TagEditor.annotate(apps: scannedApps, store: store)
-            let quickSearchDocs = QuickSearchEngine.makeDocuments(apps: apps, store: store)
-            let colors = store.tags.mapValues { $0.color }
-            let order = TagEditor.orderedTagNames()
+            let result = AppLibraryController.applySmartStartSuggestion(
+                draft,
+                scannedApps: scannedApps
+            )
 
             DispatchQueue.main.async {
                 pendingSmartStartDraft = nil
-                allApps = apps
-                quickSearchDocuments = quickSearchDocs
-                tagColors = colors
-                draggedTagNames = order
-                rebuildDisplayGroups(apps: apps, tagOrder: order)
-                if quickSearchVisible {
-                    refreshQuickSearchResults()
-                }
+                applyAppLibrarySnapshot(result.snapshot)
                 if let summary = result.summary {
                     showSmartStartNotice(mode: .manuallyApplied, summary: summary)
                 } else {
@@ -1820,7 +1770,9 @@
     }
 
     private func handleAppGridScrollActivity() {
-        appGridInteraction.hoveredBubble = nil
+        if appGridInteraction.hoveredBubble != nil {
+            appGridInteraction.hoveredBubble = nil
+        }
     }
 
     private func handleBubbleHover(app: AppInfo, frame: CGRect, event: AppBubbleHoverEvent) {
@@ -1964,6 +1916,13 @@
     }
 
     private func handleTagNavigationHover(_ id: String, active: Bool) {
+        if appGridInteraction.appDragModeActive {
+            if !active, appGridInteraction.tagNavigationHoveredGroupName == id {
+                appGridInteraction.tagNavigationHoveredGroupName = nil
+            }
+            return
+        }
+
         guard active else {
             if appGridInteraction.tagNavigationHoveredGroupName == id {
                 appGridInteraction.tagNavigationHoveredGroupName = nil
@@ -1974,6 +1933,24 @@
         appGridInteraction.tagNavigationHoveredGroupName = id
         fillColorlessContainer(id)
         scrollToTagFromHover(id)
+    }
+
+    private func handleTagNavigationAppDropHover(_ id: String, active: Bool) {
+        guard appGridInteraction.appDragModeActive else {
+            if appGridInteraction.tagNavigationAppDropTargetName == id {
+                appGridInteraction.tagNavigationAppDropTargetName = nil
+            }
+            return
+        }
+
+        guard active, canAssignDroppedAppToTag(id) else {
+            if appGridInteraction.tagNavigationAppDropTargetName == id {
+                appGridInteraction.tagNavigationAppDropTargetName = nil
+            }
+            return
+        }
+
+        appGridInteraction.tagNavigationAppDropTargetName = id
     }
 
     private func scrollToTagFromHover(_ id: String) {
@@ -2113,6 +2090,22 @@
         refreshApps(forceLayoutRefresh: true)
     }
 
+    private func dropAppOnTagNavigation(path: String, sourceTag: String, targetTag: String, copy: Bool) {
+        resetTransientDragState()
+        guard canAssignDroppedAppToTag(targetTag) else { return }
+        guard let app = allApps.first(where: { $0.path.path == path }) else { return }
+        guard !appHasTag(app, tagName: targetTag) else { return }
+        TagEditor.appendTags([targetTag], to: [path])
+        showDropRefresh()
+        refreshApps(forceLayoutRefresh: true)
+    }
+
+    private func canAssignDroppedAppToTag(_ tagName: String) -> Bool {
+        tagColors[tagName] != nil
+            && !isAppleBuiltInDropTarget(tagName)
+            && !isUncategorizedDropTarget(tagName)
+    }
+
     private func dropAppOutsideGroup(path: String, sourceTag: String, copy: Bool) {
         resetTransientDragState(keepingPendingTagRemovalDrop: true)
         guard isRemovableRegularTag(sourceTag) else { return }
@@ -2138,7 +2131,13 @@
         guard !removableTags.isEmpty else { return }
         let assignedTags = assignedRegularDisplayTags(for: removableTags)
 
+        if skipUncategorizedDropConfirm {
+            moveDroppedAppToUncategorized(path: app.path.path, tags: removableTags)
+            return
+        }
+
         clearAppBubbleState()
+        appGridInteraction.uncategorizedDropSuppressFuturePrompt = false
         withAnimation(.spring(response: 0.24, dampingFraction: 0.84)) {
             appGridInteraction.pendingUncategorizedDrop = PendingUncategorizedDrop(
                 app: app,
@@ -2192,6 +2191,7 @@
     }
 
     private func dismissUncategorizedDropConfirm() {
+        appGridInteraction.uncategorizedDropSuppressFuturePrompt = false
         resetTransientDragState(keepingPendingUncategorizedDrop: true)
         withAnimation(.easeOut(duration: 0.18)) {
             appGridInteraction.pendingUncategorizedDrop = nil
@@ -2202,10 +2202,19 @@
         guard let pendingDrop = appGridInteraction.pendingUncategorizedDrop else { return }
         let path = pendingDrop.app.path.path
         let tags = pendingDrop.removableTags
+        let shouldSuppressFuturePrompt = appGridInteraction.uncategorizedDropSuppressFuturePrompt
+        if shouldSuppressFuturePrompt {
+            skipUncategorizedDropConfirm = true
+        }
+        appGridInteraction.uncategorizedDropSuppressFuturePrompt = false
         resetTransientDragState(keepingPendingUncategorizedDrop: true)
         withAnimation(.easeOut(duration: 0.16)) {
             appGridInteraction.pendingUncategorizedDrop = nil
         }
+        moveDroppedAppToUncategorized(path: path, tags: tags)
+    }
+
+    private func moveDroppedAppToUncategorized(path: String, tags: [String]) {
         guard !tags.isEmpty else { return }
         TagEditor.removeTags(tags, from: [path])
         showDropRefresh()
@@ -2308,12 +2317,17 @@
         if active {
             endTagNavReorder()
             clearAppBubbleState()
+            appGridInteraction.tagNavigationAppDropTargetName = nil
         }
         appGridInteraction.appDragModeActive = active
+        if !active {
+            appGridInteraction.tagNavigationAppDropTargetName = nil
+        }
         if active {
             DispatchQueue.main.asyncAfter(deadline: .now() + 8) {
                 if appGridInteraction.appDragModeActive && !AppDragCoordinator.shared.hasActiveDrag {
                     appGridInteraction.appDragModeActive = false
+                    appGridInteraction.tagNavigationAppDropTargetName = nil
                 }
             }
         }
@@ -2327,6 +2341,9 @@
         AppDragCoordinator.shared.cancelDrag()
         if appGridInteraction.appDragModeActive {
             appGridInteraction.appDragModeActive = false
+        }
+        if appGridInteraction.tagNavigationAppDropTargetName != nil {
+            appGridInteraction.tagNavigationAppDropTargetName = nil
         }
         if hadAppDragState {
             appGridInteraction.appDragResetToken &+= 1
@@ -2363,27 +2380,10 @@
 
         refreshInProgress = true
         DispatchQueue.global(qos: .userInitiated).async {
-            let scannedApps = AppIndexer.scan()
-            let reconciledStore = TagEditor.reconcileScannedApps(scannedApps)
-            let smartStartResult = SmartStartService.runIfNeeded(
-                apps: scannedApps,
-                store: reconciledStore
-            )
-            let store = smartStartResult.store
-            let apps = TagEditor.annotate(apps: scannedApps, store: store)
-            let quickSearchDocs = QuickSearchEngine.makeDocuments(apps: apps, store: store)
-            let colors = store.tags.mapValues { $0.color }
-            let order = TagEditor.orderedTagNames()
+            let result = AppLibraryController.refresh()
             DispatchQueue.main.async {
-                allApps = apps
-                quickSearchDocuments = quickSearchDocs
-                tagColors = colors
-                draggedTagNames = order
-                rebuildDisplayGroups(apps: apps, tagOrder: order)
-                if quickSearchVisible {
-                    refreshQuickSearchResults()
-                }
-                handleSmartStartRunResult(smartStartResult)
+                applyAppLibrarySnapshot(result.snapshot)
+                handleSmartStartRunResult(result.smartStartResult)
                 if forceLayoutRefresh {
                     finishDropRefreshAfterMinimumDuration()
                 }
@@ -2398,6 +2398,17 @@
         }
     }
 
+    private func applyAppLibrarySnapshot(_ snapshot: AppLibrarySnapshot) {
+        allApps = snapshot.apps
+        quickSearchDocuments = snapshot.quickSearchDocuments
+        tagColors = snapshot.tagColors
+        draggedTagNames = snapshot.tagOrder
+        rebuildDisplayGroups(apps: snapshot.apps, tagOrder: snapshot.tagOrder)
+        if quickSearchVisible {
+            refreshQuickSearchResults()
+        }
+    }
+
     private func launchApp(
         _ app: AppInfo,
         closeQuickSearchOnSuccess: Bool = false,
@@ -2406,6 +2417,13 @@
     ) {
         appGridInteraction.appDragModeActive = false
         endTagNavReorder()
+        let closeQuickSearchAndOverlayBeforeOpening = closeQuickSearchOnSuccess
+            && closeOverlayOnSuccess
+            && (quickSearchCloseHidesOverlay || quickSearchOnlySession)
+        if closeQuickSearchAndOverlayBeforeOpening {
+            closeQuickSearch(hideOverlayIfNeeded: true)
+            hideOverlay()
+        }
         let configuration = NSWorkspace.OpenConfiguration()
         NSWorkspace.shared.openApplication(at: app.path, configuration: configuration) { _, error in
             DispatchQueue.main.async {
@@ -2417,10 +2435,10 @@
                 DispatchQueue.global(qos: .utility).async {
                     TagEditor.recordLauncherOpen(for: app.path.path)
                 }
-                if closeQuickSearchOnSuccess {
-                    closeQuickSearch(hideOverlayIfNeeded: false)
+                if closeQuickSearchOnSuccess && !closeQuickSearchAndOverlayBeforeOpening {
+                    closeQuickSearch(hideOverlayIfNeeded: closeOverlayOnSuccess)
                 }
-                if closeOverlayOnSuccess {
+                if closeOverlayOnSuccess && !closeQuickSearchAndOverlayBeforeOpening {
                     hideOverlay()
                 }
             }

--
Gitblit v1.9.3