From ec338c687e2e04bd37ab5c76a0a9c19769190502 Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Sun, 30 Aug 2026 02:09:13 +0800
Subject: [PATCH] docs: record 8.4.0 testflight upload

---
 C1.source/Apptag/TagNavigationView.swift |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/C1.source/Apptag/TagNavigationView.swift b/C1.source/Apptag/TagNavigationView.swift
index 551eaa1..5cc3871 100644
--- a/C1.source/Apptag/TagNavigationView.swift
+++ b/C1.source/Apptag/TagNavigationView.swift
@@ -209,7 +209,7 @@
     ) {
         let oldNames = self.items.map(\.name)
         let newNames = items.map(\.name)
-        let needsRebuild = Set(oldNames) != Set(newNames) || self.orientation != orientation
+        let needsRebuild = oldNames.count != newNames.count || Set(oldNames) != Set(newNames) || self.orientation != orientation
         self.items = items
         self.orientation = orientation
         self.contentInsets = contentInsets
@@ -292,9 +292,14 @@
     }
 
     private func reuseButtonsInCurrentOrder() {
-        let existing = Dictionary(uniqueKeysWithValues: buttons.map { ($0.itemName, $0) })
+        var existing: [String: [TagNavigationButton]] = [:]
+        for button in buttons {
+            existing[button.itemName, default: []].append(button)
+        }
         buttons = items.compactMap { item in
-            guard let button = existing[item.name] else { return nil }
+            guard var candidates = existing[item.name], !candidates.isEmpty else { return nil }
+            let button = candidates.removeFirst()
+            existing[item.name] = candidates
             button.configure(item: item, orientation: orientation)
             button.refreshAppDropRegistration()
             return button

--
Gitblit v1.9.3