-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDevLogApp.swift
More file actions
42 lines (38 loc) · 1.36 KB
/
Copy pathDevLogApp.swift
File metadata and controls
42 lines (38 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//
// DevLogApp.swift
// DevLog
//
// Created by opfic on 5/2/25.
//
import SwiftUI
import DevLogCore
import DevLogData
import DevLogDomain
import DevLogPresentation
@main
struct DevLogApp: App {
@UIApplicationDelegateAdaptor(AppDelegate.self) var delegate
@Environment(\.diContainer) var container: DIContainer
@Environment(\.scenePhase) var scenePhase
init() {
AppAssembler().assemble(AppDIContainer.shared)
}
var body: some Scene {
WindowGroup {
RootView(
sessionUseCase: container.resolve(ObserveAuthSessionUseCase.self),
networkConnectivityUseCase: container.resolve(ObserveNetworkConnectivityUseCase.self),
systemThemeUseCase: container.resolve(ObserveSystemThemeUseCase.self),
trackAnalyticsEventUseCase: container.resolve(TrackAnalyticsEventUseCase.self),
widgetURLTab: { MainTab(widgetURL: $0) },
pushNotificationTodoIdPublisher: PushNotificationRoute.shared.observe(),
clearPushNotificationRoute: { PushNotificationRoute.shared.clear() }
)
.autocorrectionDisabled()
.onChange(of: scenePhase) { _, phase in
guard phase == .background else { return }
container.resolve(WidgetSyncEventBus.self).publish(.syncRequested)
}
}
}
}