File tree Expand file tree Collapse file tree 3 files changed +27
-0
lines changed
Expand file tree Collapse file tree 3 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,10 @@ final class DebugSettings: ObservableObject {
2525 var restartXcodeInspectorIfAccessibilityAPIIsMalfunctioningNoTimer
2626 @AppStorage ( \. toastForTheReasonWhyXcodeInspectorNeedsToBeRestarted)
2727 var toastForTheReasonWhyXcodeInspectorNeedsToBeRestarted
28+ @AppStorage ( \. observeToAXNotificationOnAnotherThread)
29+ var observeToAXNotificationOnAnotherThread
30+ @AppStorage ( \. observeToAXNotificationWithDefaultMode)
31+ var observeToAXNotificationWithDefaultMode
2832 init ( ) { }
2933}
3034
@@ -116,6 +120,20 @@ struct DebugSettingsView: View {
116120 UserDefaults . shared. set ( nil , forKey: " ChatModels " )
117121 UserDefaults . shared. set ( nil , forKey: " EmbeddingModels " )
118122 }
123+
124+ Group {
125+ Toggle (
126+ isOn: $settings. observeToAXNotificationOnAnotherThread
127+ ) {
128+ Text ( " Observe to AXNotification on background thread " )
129+ }
130+
131+ Toggle (
132+ isOn: $settings. observeToAXNotificationWithDefaultMode
133+ ) {
134+ Text ( " Observe to AXNotification with default mode " )
135+ }
136+ }
119137 }
120138 }
121139 . padding ( )
Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ let package = Package(
160160 . target(
161161 name: " AXNotificationStream " ,
162162 dependencies: [
163+ " Preferences " ,
163164 " Logger " ,
164165 ]
165166 ) ,
Original file line number Diff line number Diff line change @@ -604,5 +604,13 @@ public extension UserDefaultPreferenceKeys {
604604 key: " FeatureFlag-ToastForTheReasonWhyXcodeInspectorNeedsToBeRestarted "
605605 )
606606 }
607+
608+ var observeToAXNotificationOnAnotherThread : FeatureFlag {
609+ . init( defaultValue: false , key: " FeatureFlag-observeToAXNotificationOnAnotherThread " )
610+ }
611+
612+ var observeToAXNotificationWithDefaultMode : FeatureFlag {
613+ . init( defaultValue: false , key: " FeatureFlag-observeToAXNotificationWithDefaultMode " )
614+ }
607615}
608616
You can’t perform that action at this time.
0 commit comments