From d66ed9c5dc95cbf46d35eacacd83868025ab018d Mon Sep 17 00:00:00 2001 From: mathieu J Date: Fri, 9 Feb 2024 16:39:09 +0200 Subject: [PATCH] :recycle: (LekaApp): Rename isCompanyConnected to isUserLoggedOut --- Apps/LekaApp/Sources/MainApp.swift | 2 +- .../Process/AccountCreationProcess+Step4.swift | 2 +- .../_NEWCodeBase/Views/MainView/NoAccountConnectedLabel.swift | 2 +- .../_NEWCodeBase/Views/Profiles/CaregiverAvatarCell.swift | 2 +- Apps/LekaApp/Sources/_NEWCodeBase/Views/WelcomeView.swift | 2 +- .../Sources/Authentication/AuthManagerViewModel.swift | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Apps/LekaApp/Sources/MainApp.swift b/Apps/LekaApp/Sources/MainApp.swift index d1664243cc..f3332313a8 100644 --- a/Apps/LekaApp/Sources/MainApp.swift +++ b/Apps/LekaApp/Sources/MainApp.swift @@ -29,7 +29,7 @@ struct LekaApp: App { .onAppear { self.styleManager.setDefaultColorScheme(self.colorScheme) } - .fullScreenCover(isPresented: self.$authManagerViewModel.isWelcomeViewPresented) { + .fullScreenCover(isPresented: self.$authManagerViewModel.isUserLoggedOut) { WelcomeView() } .tint(self.styleManager.accentColor) diff --git a/Apps/LekaApp/Sources/_NEWCodeBase/Views/AccountCreation/Process/AccountCreationProcess+Step4.swift b/Apps/LekaApp/Sources/_NEWCodeBase/Views/AccountCreation/Process/AccountCreationProcess+Step4.swift index 7088891826..2676907623 100644 --- a/Apps/LekaApp/Sources/_NEWCodeBase/Views/AccountCreation/Process/AccountCreationProcess+Step4.swift +++ b/Apps/LekaApp/Sources/_NEWCodeBase/Views/AccountCreation/Process/AccountCreationProcess+Step4.swift @@ -23,7 +23,7 @@ extension AccountCreationProcess { if !self.rootOwnerViewModel.mockCaregiversSet.isEmpty { self.rootOwnerViewModel.currentCaregiver = self.rootOwnerViewModel.mockCaregiversSet.last } - self.authManagerViewModel.isWelcomeViewPresented.toggle() + self.authManagerViewModel.isUserLoggedOut.toggle() } .buttonStyle(.bordered) } diff --git a/Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/NoAccountConnectedLabel.swift b/Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/NoAccountConnectedLabel.swift index 74b9f7c327..b985062082 100644 --- a/Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/NoAccountConnectedLabel.swift +++ b/Apps/LekaApp/Sources/_NEWCodeBase/Views/MainView/NoAccountConnectedLabel.swift @@ -27,7 +27,7 @@ struct NoAccountConnectedLabel: View { .multilineTextAlignment(.center) Button(String(l10n.NoAccountConnectedLabel.buttonLabel.characters)) { - self.authManagerViewModel.isWelcomeViewPresented = true + self.authManagerViewModel.isUserLoggedOut = true } .buttonStyle(.bordered) } diff --git a/Apps/LekaApp/Sources/_NEWCodeBase/Views/Profiles/CaregiverAvatarCell.swift b/Apps/LekaApp/Sources/_NEWCodeBase/Views/Profiles/CaregiverAvatarCell.swift index ae9ea7ce7e..8538db34ff 100644 --- a/Apps/LekaApp/Sources/_NEWCodeBase/Views/Profiles/CaregiverAvatarCell.swift +++ b/Apps/LekaApp/Sources/_NEWCodeBase/Views/Profiles/CaregiverAvatarCell.swift @@ -21,7 +21,7 @@ struct CaregiverAvatarCell: View { self.rootOwnerViewModel.currentCaregiver = self.caregiver self.styleManager.colorScheme = self.caregiver.preferredColorScheme self.styleManager.accentColor = self.caregiver.preferredAccentColor - self.authManagerViewModel.isWelcomeViewPresented = false + self.authManagerViewModel.isUserLoggedOut = false self.rootOwnerViewModel.isCaregiverPickerViewPresented = false } label: { VStack(spacing: 10) { diff --git a/Apps/LekaApp/Sources/_NEWCodeBase/Views/WelcomeView.swift b/Apps/LekaApp/Sources/_NEWCodeBase/Views/WelcomeView.swift index b0879b9672..64faffe959 100644 --- a/Apps/LekaApp/Sources/_NEWCodeBase/Views/WelcomeView.swift +++ b/Apps/LekaApp/Sources/_NEWCodeBase/Views/WelcomeView.swift @@ -30,7 +30,7 @@ struct WelcomeView: View { .toolbar { ToolbarItem(placement: .navigationBarTrailing) { Button(String(l10n.WelcomeView.skipStepButton.characters)) { - self.authManagerViewModel.isWelcomeViewPresented.toggle() + self.authManagerViewModel.isUserLoggedOut.toggle() } } } diff --git a/Modules/AccountKit/Sources/Authentication/AuthManagerViewModel.swift b/Modules/AccountKit/Sources/Authentication/AuthManagerViewModel.swift index 9114f91c9a..d633e7a26a 100644 --- a/Modules/AccountKit/Sources/Authentication/AuthManagerViewModel.swift +++ b/Modules/AccountKit/Sources/Authentication/AuthManagerViewModel.swift @@ -31,7 +31,7 @@ public class AuthManagerViewModel: ObservableObject { @Published public var showactionRequestAlert = false @Published public var notificationMessage: String = "" @Published public var showNotificationAlert = false - @Published public var isWelcomeViewPresented = false + @Published public var isUserLoggedOut = false // MARK: Private @@ -93,6 +93,6 @@ public class AuthManagerViewModel: ObservableObject { self.showErrorAlert = false self.notificationMessage = "" self.showNotificationAlert = false - self.isWelcomeViewPresented = true + self.isUserLoggedOut = true } }