π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
sync on app launch
Prateek Sunal6120e2519cb1
diff --git a/mobile/native/darwin/Apps/ensu/ensu/HomeView.swift b/mobile/native/darwin/Apps/ensu/ensu/HomeView.swiftindex e5475addb9..8ac92b704d 100644--- a/mobile/native/darwin/Apps/ensu/ensu/HomeView.swift+++ b/mobile/native/darwin/Apps/ensu/ensu/HomeView.swift@@ -4,17 +4,25 @@ struct HomeView: View {@EnvironmentObject private var appState: EnsuAppState@StateObject private var chatModel = ChatViewModel()@State private var isShowingAuth = false+ @State private var didTriggerInitialSync = falsevar body: some View {ChatView(viewModel: chatModel, isShowingAuth: $isShowingAuth).platformFullScreenCover(isPresented: $isShowingAuth) {AuthFlowView()}+ .task {+ guard appState.isLoggedIn, !didTriggerInitialSync else { return }+ didTriggerInitialSync = true+ chatModel.syncAfterLogin()+ }.onChange(of: appState.isLoggedIn) { isLoggedIn inif isLoggedIn {isShowingAuth = false+ didTriggerInitialSync = truechatModel.syncAfterLogin()} else {+ didTriggerInitialSync = falsechatModel.handleLogout()}}