Skip to content

Commit 3d6313d

Browse files
committed
IOS-5385 Migrate Application Coordinator
1 parent 73fa525 commit 3d6313d

File tree

2 files changed

+17
-15
lines changed

2 files changed

+17
-15
lines changed

Anytype/Sources/ApplicationLayer/AppCoordinator/ApplicationCoordinatorView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import AnytypeCore
44

55
struct ApplicationCoordinatorView: View {
66

7-
@StateObject private var model = ApplicationCoordinatorViewModel()
7+
@State private var model = ApplicationCoordinatorViewModel()
88
@Environment(\.dismissAllPresented) private var dismissAllPresented
99

1010
var body: some View {

Anytype/Sources/ApplicationLayer/AppCoordinator/ApplicationCoordinatorViewModel.swift

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,35 +4,37 @@ import AnytypeCore
44
import Services
55

66
@MainActor
7-
final class ApplicationCoordinatorViewModel: ObservableObject {
7+
@Observable
8+
final class ApplicationCoordinatorViewModel {
89

9-
@Injected(\.authService)
10+
@Injected(\.authService) @ObservationIgnored
1011
private var authService: any AuthServiceProtocol
11-
@Injected(\.accountEventHandler)
12+
@Injected(\.accountEventHandler) @ObservationIgnored
1213
private var accountEventHandler: any AccountEventHandlerProtocol
13-
@Injected(\.encryptionKeyEventHandler)
14+
@Injected(\.encryptionKeyEventHandler) @ObservationIgnored
1415
private var encryptionKeyEventHandler: any EncryptionKeyEventHandlerProtocol
15-
@Injected(\.applicationStateService)
16+
@Injected(\.applicationStateService) @ObservationIgnored
1617
private var applicationStateService: any ApplicationStateServiceProtocol
17-
@Injected(\.accountManager)
18+
@Injected(\.accountManager) @ObservationIgnored
1819
private var accountManager: any AccountManagerProtocol
19-
@Injected(\.seedService)
20+
@Injected(\.seedService) @ObservationIgnored
2021
private var seedService: any SeedServiceProtocol
21-
@Injected(\.fileErrorEventHandler)
22+
@Injected(\.fileErrorEventHandler) @ObservationIgnored
2223
private var fileErrorEventHandler: any FileErrorEventHandlerProtocol
23-
@Injected(\.basicUserInfoStorage)
24+
@Injected(\.basicUserInfoStorage) @ObservationIgnored
2425
private var basicUserInfoStorage: any BasicUserInfoStorageProtocol
25-
@Injected(\.pushNotificationsPermissionService)
26+
@Injected(\.pushNotificationsPermissionService) @ObservationIgnored
2627
private var pushNotificationsPermissionService: any PushNotificationsPermissionServiceProtocol
2728

29+
@ObservationIgnored
2830
private var dismissAllPresented: DismissAllPresented?
2931

3032
// MARK: - State
3133

32-
@Published var applicationState: ApplicationState = .initial
33-
@Published var toastBarData: ToastBarData?
34-
@Published var migrationData: MigrationModuleData?
35-
@Published var selectAccountTaskId: String?
34+
var applicationState: ApplicationState = .initial
35+
var toastBarData: ToastBarData?
36+
var migrationData: MigrationModuleData?
37+
var selectAccountTaskId: String?
3638

3739
func deleteAccount() -> AnyView? {
3840
if case let .pendingDeletion(deadline) = accountManager.account.status {

0 commit comments

Comments
 (0)