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
}
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
}