widget picker bug fixes
This commit is contained in:
1 parent
210ca4190a
commit
605f276a71
1 file changed
+7
-1
@@ -1644,7 +1644,13 @@ struct WidgetPickerView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private var shouldBypassCreateWidgetSheet: Bool {
|
private var shouldBypassCreateWidgetSheet: Bool {
|
||||||
poolItems.count == 1 || (targetWidgetKind == .pad && buttonCommandCount == 1)
|
guard !poolItems.isEmpty else { return false }
|
||||||
|
|
||||||
|
let isSinglePadSelection = poolItems.count == 1 && isPad(poolItems[0])
|
||||||
|
let isSingleButtonThenSinglePadSelection =
|
||||||
|
poolItems.count == 2 && !isPad(poolItems[0]) && isPad(poolItems[1])
|
||||||
|
|
||||||
|
return isSinglePadSelection || isSingleButtonThenSinglePadSelection
|
||||||
}
|
}
|
||||||
|
|
||||||
private func prepareCreateWidgetDefaults(for submissionAction: WidgetPickerSubmissionAction) {
|
private func prepareCreateWidgetDefaults(for submissionAction: WidgetPickerSubmissionAction) {
|
||||||
|
|||||||
Reference in new issue
Block a user