From b2a06ec5ebc86c0241e635782ae5a032ab5aad0a Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Thu, 02 Jul 2026 02:43:51 +0800
Subject: [PATCH] Prepare TagLauncher 8.3.2 App Store candidate
---
src/Apptag/TagNavigationView.swift | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/src/Apptag/TagNavigationView.swift b/src/Apptag/TagNavigationView.swift
index ce079c7..551eaa1 100644
--- a/src/Apptag/TagNavigationView.swift
+++ b/src/Apptag/TagNavigationView.swift
@@ -498,16 +498,37 @@
let start = Date()
let longPressDuration: TimeInterval = 0.35
+ let maxTrackingDuration: TimeInterval = 8
var reorderActive = false
var finished = false
while !finished {
+ guard let window,
+ window.isVisible,
+ NSApp.isActive,
+ Date().timeIntervalSince(start) < maxTrackingDuration
+ else {
+ if reorderActive {
+ onReorderEnded()
+ }
+ break
+ }
+
if !reorderActive && Date().timeIntervalSince(start) >= longPressDuration {
reorderActive = true
onReorderBegan(item.id)
}
- let nextEvent = window?.nextEvent(
+ if NSEvent.pressedMouseButtons & (1 << 0) == 0 {
+ if reorderActive {
+ onReorderEnded()
+ } else {
+ onActivate(item.id)
+ }
+ break
+ }
+
+ let nextEvent = window.nextEvent(
matching: [.leftMouseDragged, .leftMouseUp],
until: Date().addingTimeInterval(0.04),
inMode: .eventTracking,
--
Gitblit v1.9.3