minor fixes
This commit is contained in:
1 parent
2652c2a99b
commit
41a5855211
3 files changed
+7
-4
No files matched your search
@@ -464,8 +464,8 @@ import CoreMotion
|
|||||||
var sampleCount = 0
|
var sampleCount = 0
|
||||||
|
|
||||||
if useBuiltinGyro {
|
if useBuiltinGyro {
|
||||||
motionManager.startGyroUpdates(to: .main) { [weak self] gyroData, _ in
|
motionManager.startDeviceMotionUpdates(to: .main) { [weak self] motionData, _ in
|
||||||
guard let self = self, self.isCalibrating, let data = gyroData else { return }
|
guard let self = self, self.isCalibrating, let data = motionData else { return }
|
||||||
sumX += data.rotationRate.x
|
sumX += data.rotationRate.x
|
||||||
sumY += data.rotationRate.y
|
sumY += data.rotationRate.y
|
||||||
sumZ += data.rotationRate.z
|
sumZ += data.rotationRate.z
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ import UIKit
|
|||||||
message: "In-app-purchase not available on this device.".localized,
|
message: "In-app-purchase not available on this device.".localized,
|
||||||
withCancel: false,
|
withCancel: false,
|
||||||
buttonTitle: "OK".localized,
|
buttonTitle: "OK".localized,
|
||||||
countdown: 6
|
countdown: 0
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1489,7 +1489,10 @@ struct WidgetPickerView: View {
|
|||||||
selectedCmds.append(Self.selectionIdentifier(for: cmd))
|
selectedCmds.append(Self.selectionIdentifier(for: cmd))
|
||||||
poolItems.append(item)
|
poolItems.append(item)
|
||||||
} else if let trailingPadIndex = trailingCombinablePadIndex {
|
} 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)
|
poolItems.insert(item, at: trailingPadIndex)
|
||||||
} else {
|
} else {
|
||||||
selectedCmds.append(Self.selectionIdentifier(for: cmd))
|
selectedCmds.append(Self.selectionIdentifier(for: cmd))
|
||||||
|
|||||||
Reference in new issue
Block a user