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")) {
|
secondaryButton: .default(Text("Confirm")) {
|
||||||
print("adding contact to circle")
|
print("adding contact to circle")
|
||||||
// call method in vm to get it done, then navigate to the 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
|
if self.authSessionStore.friendsArr.count < 10 {
|
||||||
print(res)
|
self.contactsVM.addOrActivateFriendToCircle(userId: self.authSessionStore.user!.id!, friendId: (contact.user!.id)!) {res in
|
||||||
|
print(res)
|
||||||
|
|
||||||
switch res {
|
switch res {
|
||||||
case .error(let err):
|
case .error(let err):
|
||||||
print(err)
|
print(err)
|
||||||
case .success(let str):
|
case .success(let str):
|
||||||
print(str)
|
print(str)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
self.navigationStack.push(InnerCircleView())
|
self.navigationStack.push(InnerCircleView())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -202,8 +202,10 @@ struct CircleGridView: View {
|
|||||||
message: Text(self.alertSubtext),
|
message: Text(self.alertSubtext),
|
||||||
primaryButton: .destructive(Text("Reject"), action: {
|
primaryButton: .destructive(Text("Reject"), action: {
|
||||||
// create user friend but a rejected one
|
// create user friend but a rejected one
|
||||||
self.innerCircleVM.activateOrDeactiveInboxUser(activate: false, userId: self.authSessionStore.user!.id!, friendId: inboxUserId) { res in
|
if self.authSessionStore.friendsArr.count < 10 {
|
||||||
print(res)
|
self.innerCircleVM.activateOrDeactiveInboxUser(activate: false, userId: self.authSessionStore.user!.id!, friendId: inboxUserId) { res in
|
||||||
|
print(res)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
secondaryButton: .default(Text("Add"), action: {
|
secondaryButton: .default(Text("Add"), action: {
|
||||||
|
|||||||
Reference in New Issue
Block a user