Skip to content

Commit bbff9fa

Browse files
committed
🐞 Isolate MultitouchTrigger to @mainactor
1 parent 7512a08 commit bbff9fa

2 files changed

Lines changed: 2 additions & 4 deletions

File tree

Loop/Core/Observers/MultitouchTrigger.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import Subsurface
1111
import SwiftUI
1212

1313
@Loggable
14+
@MainActor
1415
final class MultitouchTrigger {
1516
private let windowActionCache: WindowActionCache
1617
private let openCallback: (WindowAction, Window) async throws -> ()
@@ -158,7 +159,7 @@ final class MultitouchTrigger {
158159
await handlePan(pan, fingerCount: fingerCount)
159160
case let .pinch(pinch):
160161
await handlePinch(pinch, fingerCount: fingerCount)
161-
case .rotation:
162+
case .determining, .rotation:
162163
break
163164
}
164165
}

Loop/Settings Window/Settings/Gestures/GesturesConfigurationView.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ struct GesturesConfigurationView: View {
3131
bindingsSection
3232
.disabled(!enableGestures)
3333
}
34-
// GestureBinding's synthesized Hashable covers its mutable fields,
35-
// so editing a selected binding rehashes the stored struct and the
36-
// Set goes stale. Reconcile by id after every change.
3734
.onChange(of: gestureBindings) { newValue in
3835
let bindingsByID = Dictionary(uniqueKeysWithValues: newValue.map { ($0.id, $0) })
3936
let selectedIDs = model.selectedBindings.map(\.id)

0 commit comments

Comments
 (0)