Skip to content

Closure for if feature has already been voted #22

@JamesSedlacek

Description

@JamesSedlacek

I'd like the ability to show a toast message whenever a user taps on a feature they already voted for.
I can handle showing the message, but I need the RoadmapFeatureViewModel to be able to take in a closure & execute it inside of this guard statement:
func vote() {
guard !feature.hasVoted else {
print("already voted for this, can't vote again")
return
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions