adding limits but not doing anything like showing alert
This commit is contained in:
@@ -135,18 +135,20 @@ struct ListContactRow: View {
|
||||
secondaryButton: .default(Text("Confirm")) {
|
||||
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)!) {res in
|
||||
print(res)
|
||||
|
||||
switch res {
|
||||
case .error(let err):
|
||||
print(err)
|
||||
case .success(let str):
|
||||
print(str)
|
||||
if self.authSessionStore.friendsArr.count < 10 {
|
||||
self.contactsVM.addOrActivateFriendToCircle(userId: self.authSessionStore.user!.id!, friendId: (contact.user!.id)!) {res in
|
||||
print(res)
|
||||
|
||||
switch res {
|
||||
case .error(let err):
|
||||
print(err)
|
||||
case .success(let str):
|
||||
print(str)
|
||||
}
|
||||
}
|
||||
|
||||
self.navigationStack.push(InnerCircleView())
|
||||
}
|
||||
|
||||
self.navigationStack.push(InnerCircleView())
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@@ -202,8 +202,10 @@ struct CircleGridView: View {
|
||||
message: Text(self.alertSubtext),
|
||||
primaryButton: .destructive(Text("Reject"), action: {
|
||||
// create user friend but a rejected one
|
||||
self.innerCircleVM.activateOrDeactiveInboxUser(activate: false, userId: self.authSessionStore.user!.id!, friendId: inboxUserId) { res in
|
||||
print(res)
|
||||
if self.authSessionStore.friendsArr.count < 10 {
|
||||
self.innerCircleVM.activateOrDeactiveInboxUser(activate: false, userId: self.authSessionStore.user!.id!, friendId: inboxUserId) { res in
|
||||
print(res)
|
||||
}
|
||||
}
|
||||
}),
|
||||
secondaryButton: .default(Text("Add"), action: {
|
||||
|
||||
Reference in New Issue
Block a user