From a05bd1de55a310a37eafef0e67653576e0a27bb6 Mon Sep 17 00:00:00 2001
From: Ariver <ar@MacBook-Air.local>
Date: Wed, 06 May 2026 16:39:42 +0800
Subject: [PATCH] checkpoint: v3.0.4 — 新建 tag 插入到列表最上面(tagOrder.insert at:0),createTag 和 assignTag 统一

---
 Apptag/ContentView.swift |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Apptag/ContentView.swift b/Apptag/ContentView.swift
index 4a4e4f4..66c849e 100644
--- a/Apptag/ContentView.swift
+++ b/Apptag/ContentView.swift
@@ -272,10 +272,10 @@
         if phase != .none {
             NotificationCenter.default.post(name: .apptagEditModeChanged, object: nil, userInfo: ["active": true])
             NSApp.activate(ignoringOtherApps: true)
-            // Sync drag order from database when entering edit mode
-            if draggedTagNames.isEmpty {
-                draggedTagNames = TagEditor.orderedTagNames()
-            }
+            // Always sync tag list from database when entering edit mode
+            let store = TagDatabase.load()
+            tagColors = store.tags.mapValues { $0.color }
+            draggedTagNames = TagEditor.orderedTagNames()
         }
         editPhase = phase
         if phase == .none {

--
Gitblit v1.9.3