having real time user listened to in authlistener

This commit is contained in:
talksik
2021-12-19 21:15:01 -08:00
parent eea799feec
commit 298f824330
6 changed files with 48 additions and 14 deletions
@@ -90,7 +90,7 @@ struct AddBasicInfoView: View {
.font(.subheadline)
.multilineTextAlignment(.center)
Text("What does your friends call you?")
Text("What do your friends call you?")
.font(.footnote)
.foregroundColor(Color.black.opacity(0.7))
@@ -129,6 +129,13 @@ struct AddBasicInfoView: View {
}
.frame(maxHeight: .infinity)
}
.onAppear {
// get current user nickname and avatar if they have one
self.nickname = self.authSessionStore.user?.nickname ?? ""
if self.authSessionStore.user?.avatar != nil { // if user has previously selected an avatar
self.selectedAvatarIndex = Avatars.avatarSystemNames.firstIndex(of: (self.authSessionStore.user?.avatar)!) ?? 0 // 0 in case the system names doesn't have it anymore
}
}
//TODO: hook up the alert with the view model
// .alert(isPresented: Binding<Bool>(
// get: { self.addInfoViewModel.state == ProfileRegistrationState.failed},