Skip to content

New comment being created twice in PostController #19

@NortGit12

Description

@NortGit12

In PostController, in the createPostWith(image: caption: completion) method, it creates a Post instance, appends it to the posts array, then it calls the local addComment(toPost: commentText: completion) method, which contains a call to the cloudKitManager's save method which creates a comment in CloudKit. Then, returning to the createPostWith(image: caption: completion), we call the cloudKitManager.save method to save a post, but in the completion we are again calling the cloudKitManager's save method to save the comment again. Why is it being called twice on the same comment?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions