@@ -24,32 +24,32 @@ struct ForumateApp: App {
24
24
#if os(iOS) || os(macOS)
25
25
@State private var themeManager = ThemeManager ( )
26
26
#endif
27
+
28
+ @State private var plusManager = PlusManager ( )
27
29
28
30
var body : some Scene {
29
31
WindowGroup {
30
32
ContentView ( )
31
- . environmentObject ( appState)
32
- #if os(iOS) || os(macOS)
33
- . preferredColorScheme( themeManager. colorScheme)
34
- . tint ( themeManager. accentColor)
35
- #endif
33
+ . modifier ( AppViewModifier ( ) )
36
34
}
37
- . modelContainer ( container )
35
+ . environmentObject ( appState )
38
36
#if os(iOS) || os(macOS)
39
37
. environment( themeManager)
40
38
#endif
39
+ . environment( plusManager)
40
+ . modelContainer ( container)
41
+
41
42
#if os(iOS) || os(visionOS) || os(macOS)
42
43
WindowGroup ( " Topic Detail " , id: " topic " , for: TopicDetailWindowModel . self) { $detailModel in
43
44
DetailWindowView ( detailModel: detailModel)
44
- #if os(iOS) || os(macOS)
45
- . preferredColorScheme( themeManager. colorScheme)
46
- . tint ( themeManager. accentColor)
47
- #endif
45
+ . modifier ( AppViewModifier ( ) )
48
46
}
49
- . modelContainer ( container )
47
+ . environmentObject ( appState )
50
48
#if os(iOS) || os(macOS)
51
49
. environment( themeManager)
52
50
#endif
51
+ . environment( plusManager)
52
+ . modelContainer ( container)
53
53
#endif
54
54
}
55
55
}
@@ -65,7 +65,6 @@ struct DetailWindowView: View {
65
65
if let detailModel,
66
66
let community = context. model ( for: detailModel. communityID) as? Community {
67
67
TopicDetail ( topic: detailModel. topic)
68
- . environmentObject ( appState)
69
68
. environmentObject ( CommunityDetailState ( community: community) )
70
69
} else {
71
70
PlaceholderView ( text: " No Topic Detail " )
0 commit comments