Skip to content

Commit f0b2a24

Browse files
committed
Update
1 parent bb3d534 commit f0b2a24

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Core/Sources/SuggestionWidget/FeatureReducers/WidgetFeature.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ public struct WidgetFeature: ReducerProtocol {
454454
state.focusingDocumentURL = xcodeInspector.realtimeActiveDocumentURL
455455
return .none
456456

457+
#warning("TODO: use function instead of action for high rate actions like this")
457458
case let .updateWindowLocation(animated):
458459
guard let widgetLocation = generateWidgetLocation() else { return .none }
459460
state.panelState.sharedPanelState.alignTopToAnchor = widgetLocation
@@ -523,6 +524,7 @@ public struct WidgetFeature: ReducerProtocol {
523524
if shouldDebounce {
524525
try await mainQueue.sleep(for: .seconds(0.2))
525526
}
527+
try Task.checkCancellation()
526528
let task = Task { @MainActor in
527529
if let app = activeApplicationMonitor.activeApplication, app.isXcode {
528530
let application = AXUIElementCreateApplication(app.processIdentifier)

0 commit comments

Comments
 (0)