everythings broken and unsmooth
This commit is contained in:
@@ -62,8 +62,6 @@ class FirestoreService {
|
||||
completion(nil)
|
||||
} else {
|
||||
if !(querySnapshot?.isEmpty)! {
|
||||
print("existing user found!!!!: \(querySnapshot?.documents)")
|
||||
|
||||
for document in querySnapshot!.documents {
|
||||
let returnedUser = try? document.data(as: User.self)
|
||||
completion(returnedUser)
|
||||
|
||||
@@ -81,6 +81,7 @@ class ContactsViewModel : ObservableObject {
|
||||
contactVm.sortingProp = "!" // adding for sorting purposes
|
||||
contactVm.user = returnedUser
|
||||
contactVm.isExisting = true
|
||||
print("existing user: \(contactVm.cnName)")
|
||||
}
|
||||
|
||||
self?.contacts[contactVm.sortingProp] = contactVm
|
||||
|
||||
@@ -97,11 +97,12 @@ struct ListContactRow: View {
|
||||
}
|
||||
}
|
||||
.alert(self.alertText, isPresented: self.$showAlert) {
|
||||
Button("Add \(contact.cnName)", role: ButtonRole.cancel) {
|
||||
Button("Add \(contact.cnName)") {
|
||||
print("adding contact to circle")
|
||||
// call method in vm to get it done, then navigate to the circle
|
||||
self.contactsVM.addOrActivateFriendToCircle(userId: self.authSessionStore.user!.id!, friendId: (contact.user!.id)!)
|
||||
|
||||
self.navigationStack.push(InnerCircleView())
|
||||
}
|
||||
} message: {
|
||||
Text(self.alertMessage)
|
||||
|
||||
@@ -18,7 +18,7 @@ struct InnerCircleView: View {
|
||||
@EnvironmentObject var authSessionStore: AuthSessionStore
|
||||
@EnvironmentObject var navigationStack: NavigationStack
|
||||
|
||||
@State var sheetView: SheetView? = .contacts
|
||||
@State var sheetView: SheetView? = nil
|
||||
|
||||
let universalSize = UIScreen.main.bounds
|
||||
|
||||
|
||||
Reference in New Issue
Block a user