File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -2688,16 +2688,12 @@ extension MenuBarItemManager {
26882688 savedSectionForIdentifier [ item. uniqueIdentifier] != nil
26892689 guard !hasSavedSection else { return false }
26902690
2691- // Only move items that are new to this section (window ID not seen before).
2692- // Don't fall back to identity check when previousIDs is empty - that causes
2693- // false positives where items already in visible section get moved.
2694- let isNewID = !previousIDs. isEmpty && !previousIDs. contains ( item. windowID)
2695- guard isNewID else { return false }
2696-
2691+ let isNewIdentity = !knownItemIdentifiers. contains ( identifier)
2692+ let isNewID = previousIDs. isEmpty ? isNewIdentity : !previousIDs. contains ( item. windowID)
26972693 let notPlacedHidden = !hiddenTags. contains ( item. tag) && !alwaysHiddenTags. contains ( item. tag)
26982694 let bundle = bundleID ( for: item)
26992695 let notPinnedHidden = bundle. map { !pinnedHiddenBundleIDs. contains ( $0) && !pinnedAlwaysHiddenBundleIDs. contains ( $0) } ?? true
2700- return notPlacedHidden && notPinnedHidden
2696+ return notPlacedHidden && notPinnedHidden && ( isNewID || isNewIdentity )
27012697 }
27022698 guard let candidate else {
27032699 if !leftmostItems. isEmpty && savedSectionForIdentifier. isEmpty == false {
You can’t perform that action at this time.
0 commit comments