@@ -65,10 +65,6 @@ public enum ThemeModalSize: Hashable {
65
65
}
66
66
67
67
extension View {
68
- public func themeAppearance( systemScheme: ColorScheme ) -> some View {
69
- modifier ( ThemeAppearanceModifier ( systemScheme: systemScheme) )
70
- }
71
-
72
68
public func themeModal< Content> (
73
69
isPresented: Binding < Bool > ,
74
70
options: ThemeModalOptions ? = nil ,
@@ -342,9 +338,6 @@ struct ThemeBooleanModalModifier<Modal>: ViewModifier where Modal: View {
342
338
@Environment ( \. colorScheme)
343
339
private var colorScheme
344
340
345
- @AppStorage ( UIPreference . systemAppearance. key)
346
- private var systemAppearance : SystemAppearance ?
347
-
348
341
@Binding
349
342
var isPresented : Bool
350
343
@@ -368,7 +361,6 @@ struct ThemeBooleanModalModifier<Modal>: ViewModifier where Modal: View {
368
361
#endif
369
362
. interactiveDismissDisabled( !options. isInteractive)
370
363
. themeLockScreen ( )
371
- . themeAppearance ( systemScheme: colorScheme)
372
364
}
373
365
}
374
366
}
@@ -381,9 +373,6 @@ struct ThemeItemModalModifier<Modal, T>: ViewModifier where Modal: View, T: Iden
381
373
@Environment ( \. colorScheme)
382
374
private var colorScheme
383
375
384
- @AppStorage ( UIPreference . systemAppearance. key)
385
- private var systemAppearance : SystemAppearance ?
386
-
387
376
@Binding
388
377
var item : T ?
389
378
@@ -407,7 +396,6 @@ struct ThemeItemModalModifier<Modal, T>: ViewModifier where Modal: View, T: Iden
407
396
#endif
408
397
. interactiveDismissDisabled( !options. isInteractive)
409
398
. themeLockScreen ( )
410
- . themeAppearance ( systemScheme: colorScheme)
411
399
}
412
400
}
413
401
}
@@ -472,19 +460,6 @@ struct ThemeNavigationStackModifier: ViewModifier {
472
460
473
461
// MARK: - Content modifiers
474
462
475
- struct ThemeAppearanceModifier : ViewModifier {
476
-
477
- @AppStorage ( UIPreference . systemAppearance. key)
478
- private var systemAppearance : SystemAppearance ?
479
-
480
- let systemScheme : ColorScheme
481
-
482
- func body( content: Content ) -> some View {
483
- content
484
- . preferredColorScheme ( systemAppearance. colorScheme ?? systemScheme)
485
- }
486
- }
487
-
488
463
struct ThemeManualInputModifier : ViewModifier {
489
464
}
490
465
0 commit comments