Skip to content

Commit

Permalink
✨ (LekaApp): Create Library on Signup and when missing
Browse files Browse the repository at this point in the history
  • Loading branch information
macteuts committed Dec 19, 2024
1 parent baee484 commit bb4fbb5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ struct AccountCreationView: View {
if newValue == .loggedIn {
self.rootAccountManager.createRootAccount(rootAccount: RootAccount())
self.rootAccountManager.initializeRootAccountListener()
self.libraryManager.createLibrary(library: Library())
self.libraryManager.initializeLibraryListener()
self.isVerificationEmailAlertPresented = true
}
}
Expand Down Expand Up @@ -84,6 +86,7 @@ struct AccountCreationView: View {

private var authManager = AuthManager.shared
private var rootAccountManager = RootAccountManager.shared
private var libraryManager = LibraryManager.shared

private var isCreationDisabled: Bool {
self.viewModel.email.isInvalidEmail() || self.viewModel.password.isInvalidPassword()
Expand Down
1 change: 1 addition & 0 deletions Apps/LekaApp/Sources/Views/MainView/MainView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,7 @@ struct MainView: View {

@StateObject private var caregiverManagerViewModel = CaregiverManagerViewModel()
@StateObject private var rootAccountViewModel = RootAccountManagerViewModel()
@StateObject private var libraryManagerViewModel = LibraryManagerViewModel()

@State private var showingAppUpdateAlert: Bool = false
@State private var showingOSUpdateAlert: Bool = false
Expand Down

0 comments on commit bb4fbb5

Please sign in to comment.