Skip to content

Commit a97268a

Browse files
committed
Always presents large tool picker for primary buttons
1 parent 17d8495 commit a97268a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Sources/KeyboardToolbar/Views/KeyboardToolButton.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,14 +127,17 @@ private extension KeyboardToolButton {
127127
toolPickerBackgroundView.fillColor = toolPickerBackgroundColor
128128
UIDevice.current.playInputClick()
129129
cancelToolPickerTimer()
130-
guard !item.allTools.isEmpty else {
130+
let shouldPresentPicker = item.style == .primary || !item.allTools.isEmpty
131+
guard shouldPresentPicker else {
131132
return
132133
}
133134
setContentHidden(true)
134135
feedbackGenerator.prepare()
135136
if showToolPickerDelay > 0 {
136137
presentToolPicker(with: [item.representativeTool], atSize: .large)
137-
schedulePresentingAllTools()
138+
if !item.allTools.isEmpty {
139+
schedulePresentingAllTools()
140+
}
138141
} else {
139142
presentToolPicker(with: item.allTools, atSize: .large)
140143
}

0 commit comments

Comments
 (0)