File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import Preferences
2+ import SwiftUI
3+
4+ final class DebugSettings : ObservableObject {
5+ @AppStorage ( \. disableLazyVStack) var disableLazyVStack
6+ @AppStorage ( \. preCacheOnFileOpen) var preCacheOnFileOpen
7+ @AppStorage ( \. useCustomScrollViewWorkaround) var useCustomScrollViewWorkaround
8+ @AppStorage ( \. triggerActionWithAccessibilityAPI) var triggerActionWithAccessibilityAPI
9+ init ( ) { }
10+ }
11+
12+ struct DebugSettingsView : View {
13+ @StateObject var settings = DebugSettings ( )
14+
15+ var body : some View {
16+ Section {
17+ Form {
18+ Toggle ( isOn: $settings. disableLazyVStack) {
19+ Text ( " Disable LazyVStack " )
20+ }
21+ Toggle ( isOn: $settings. preCacheOnFileOpen) {
22+ Text ( " Cache editor information on file open " )
23+ }
24+ Toggle ( isOn: $settings. useCustomScrollViewWorkaround) {
25+ Text ( " Use custom scroll view workaround for smooth scrolling " )
26+ }
27+ Toggle ( isOn: $settings. triggerActionWithAccessibilityAPI) {
28+ Text ( " Trigger action with AccessibilityAPI " )
29+ }
30+ }
31+ }
32+ }
33+ }
34+
35+ struct DebugSettingsView_Preview : PreviewProvider {
36+ static var previews : some View {
37+ DebugSettingsView ( )
38+ }
39+ }
40+
You can’t perform that action at this time.
0 commit comments