minor fixes

This commit is contained in:
True Zhuanjia committed 2026-06-23 12:19:14 +08:00
1 parent 2652c2a99b
commit 41a5855211
3 files changed
+7 -4

No files matched your search

+4 -1
View File
@@ -1489,7 +1489,10 @@ struct WidgetPickerView: View {
selectedCmds.append(Self.selectionIdentifier(for: cmd))
poolItems.append(item)
} else if let trailingPadIndex = trailingCombinablePadIndex {
selectedCmds.insert(Self.selectionIdentifier(for: cmd), at: trailingPadIndex)
let selectedInsertIndex = poolItems[..<trailingPadIndex]
.filter { !isTriggerIntervalItem($0) }
.count
selectedCmds.insert(Self.selectionIdentifier(for: cmd), at: selectedInsertIndex)
poolItems.insert(item, at: trailingPadIndex)
} else {
selectedCmds.append(Self.selectionIdentifier(for: cmd))