adding limits but not doing anything like showing alert
This commit is contained in:
@@ -135,6 +135,7 @@ 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
|
||||
if self.authSessionStore.friendsArr.count < 10 {
|
||||
self.contactsVM.addOrActivateFriendToCircle(userId: self.authSessionStore.user!.id!, friendId: (contact.user!.id)!) {res in
|
||||
print(res)
|
||||
|
||||
@@ -148,6 +149,7 @@ struct ListContactRow: View {
|
||||
|
||||
self.navigationStack.push(InnerCircleView())
|
||||
}
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,9 +202,11 @@ struct CircleGridView: View {
|
||||
message: Text(self.alertSubtext),
|
||||
primaryButton: .destructive(Text("Reject"), action: {
|
||||
// create user friend but a rejected one
|
||||
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: {
|
||||
// create user friend
|
||||
|
||||
Reference in New Issue
Block a user