Ariver
2026-08-28 c8f827e22866cc98f8bbb1c8146e28b2bb40a5cd
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