From 2f5a78879bde7e817f1d3a71864685f0269ccb07 Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Mon, 18 May 2026 17:17:41 +0800
Subject: [PATCH] Hide app bubbles during drag decisions
---
Apptag/AppGridItem.swift | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/Apptag/AppGridItem.swift b/Apptag/AppGridItem.swift
index 5cda31b..22c204c 100644
--- a/Apptag/AppGridItem.swift
+++ b/Apptag/AppGridItem.swift
@@ -12,6 +12,7 @@
var onDragModeChange: ((Bool) -> Void)? = nil
var onBubbleHover: ((AppInfo, CGRect, Bool) -> Void)? = nil
var onEditNote: ((AppInfo, CGRect) -> Void)? = nil
+ var bubbleDisabled: Bool = false
var itemID: String
@Binding var hoveredAppItemID: String?
let onSelect: () -> Void
@@ -72,6 +73,11 @@
.background(
AppGridItemHoverTracker { hovering, frame in
interactionFrame = frame
+ if bubbleDisabled || dragModeActive {
+ setHoverState(false)
+ onBubbleHover?(app, frame, false)
+ return
+ }
if hovering {
setHoverState(true)
guard shouldShowAppBubble else { return }
@@ -99,6 +105,16 @@
)
.onChange(of: dragModeActive) { _, active in
wiggle = active
+ if active {
+ setHoverState(false)
+ onBubbleHover?(app, interactionFrame, false)
+ }
+ }
+ .onChange(of: bubbleDisabled) { _, disabled in
+ if disabled {
+ setHoverState(false)
+ onBubbleHover?(app, interactionFrame, false)
+ }
}
.onDisappear {
if hoveredAppItemID == itemID {
--
Gitblit v1.9.3